diff --git a/app/assets/javascripts/controllers/admin/calendar.js.erb b/app/assets/javascripts/controllers/admin/calendar.js.erb index 45f0fed92..dbe3f349a 100644 --- a/app/assets/javascripts/controllers/admin/calendar.js.erb +++ b/app/assets/javascripts/controllers/admin/calendar.js.erb @@ -726,7 +726,7 @@ Application.Controllers.controller('CreateEventModalController', ['$scope', '$ui $scope.next = function () { if ($scope.step === 1) { $scope.setNbTotalPlaces(); } if ($scope.step === 2) { return validateSelection(); } - if ($scope.step === 4) { return validateRecurrence(); } + if ($scope.step === 5) { return validateRecurrence(); } return $scope.step++; }; @@ -839,7 +839,7 @@ Application.Controllers.controller('CreateEventModalController', ['$scope', '$ui if (!$scope.availability.period) { return growl.error(_t('app.admin.calendar.select_period')); } - if (!$scope.availability.nb_periods) { + if (!$scope.availability.nb_periods || $scope.availability.nb_periods < 1) { return growl.error(_t('app.admin.calendar.select_nb_period')); } if (!$scope.availability.end_date) { diff --git a/app/assets/templates/admin/calendar/eventModal.html.erb b/app/assets/templates/admin/calendar/eventModal.html.erb index 371c68c51..10c3cdfc5 100644 --- a/app/assets/templates/admin/calendar/eventModal.html.erb +++ b/app/assets/templates/admin/calendar/eventModal.html.erb @@ -87,8 +87,13 @@ + +