registration.$save( function(registration) {
$log.info('id =', registration.id, 'state = ', registration.state);
if ( registration.id && registration.state ) {
- if ( ! info_message ) {
+ $log.error( $location.path(), registration.state, $routeParams );
+ if ( $location.path().split(/\//)[1] != registration.state ) {
$location.path( '/' + registration.state + '/' + registration.id );
} else {
$scope.info = { message: info_message, css_class: 'alert-success' };
$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' ];
value[f] = v == true || v == 'yes' ? true : false;
});
+ // count registration state
+ inc_count( 'state+' + value.state );
+
// $log.info( key, value, Counts[type] );
});
$log.info('Counts', Counts);