From 5765e3d2e4095fc1d2bfc306f7420d6f93568772 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Mon, 2 Mar 2020 16:52:54 +0100 Subject: [PATCH] move availability options to new step + wording --- .../controllers/admin/calendar.js.erb | 4 ++-- .../admin/calendar/eventModal.html.erb | 17 +++++++++++------ config/locales/app.admin.ach.yml | 2 +- config/locales/app.admin.en.yml | 5 +++-- config/locales/app.admin.es.yml | 7 ++++--- config/locales/app.admin.fr.yml | 5 +++-- config/locales/app.admin.pt.yml | 5 +++-- config/locales/app.shared.en.yml | 2 +- config/locales/app.shared.es.yml | 2 +- config/locales/app.shared.fr.yml | 2 +- config/locales/app.shared.pt.yml | 2 +- 11 files changed, 31 insertions(+), 22 deletions(-) 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 @@ + +