$scope.registration.state = new_state;
}
+ $scope.show_submission_type = function() {
+ // FIXME check if all submission are allowed by date and allow them!
+ return (
+ angular.isUndefined( $scope.user.registration_type ) // new registration
+ || angular.isUndefined( $scope.registration.state ) // not saved yet
+ || $scope.registration.state == 'draft'
+ || $scope.registration.state == 'confirmation'
+ ) ? false : true;
+ }
+ $scope.show_registration_type = function() {
+ return true;
+ }
+
$scope.reset();
}
RegistrationCtrl.$inject = [ '$scope', '$log', 'Registration', '$routeParams', '$location', '$route', 'Organizations', 'RegistrationState' ];
<form ng-controller="RegistrationCtrl" name="RegistrationForm" class="span12">
-<fieldset class="controls">
+<fieldset class="controls" ng-show="show_submission_type()">
<legend><%= locale
en => 'Registration type',
- hr => 'Odaberite tip registracije'
+ hr => 'Odaberite tip prijave'
%></legend>
-% if (0) {
<label class="radio"><input type="radio" ng-model="user.registration_type" value="lecture" ><%= locale
en => 'Oral presentation',
hr => 'Prijava usmenog izlaganja',
%></label>
<label class="radio"><input type="radio" ng-model="user.registration_type" value="poster" ><%= locale
- en => 'Poster prezentation',
+ en => 'Poster presentation',
hr => 'Prijava poster prezentacije'
%></label>
<label class="radio"><input type="radio" ng-model="user.registration_type" value="symposium" ><%= locale
en => 'Round table',
hr => 'Prijava okruglog stola',
%></label>
-<hr />
-% }
+
+</fieldset>
+
+<fieldset class="controls" ng-show="show_registration_type()">
+
+<legend><!-- show line -->
+</legend>
<label class="radio"><input type="radio" ng-model="user.registration_type" value="participant" ><%= locale
en => 'Registration',
hr => 'Registracija'
%></label>
+
<label class="radio"><input type="radio" ng-model="user.registration_type" value="accomp" ><%= locale
en => 'Registration for accompanying persons',
hr => 'Registracija za osobe u pratnji' %>
</label>
+
</fieldset>
<fieldset ng-show="user.registration_type">