From 9aef33159643ecdc04952c760be5d18bcab0b4ec Mon Sep 17 00:00:00 2001 From: Sylvain Date: Thu, 1 Sep 2016 14:54:24 +0200 Subject: [PATCH] add textual indications about empty fields in coupon form --- app/assets/javascripts/controllers/machines.coffee.erb | 2 +- app/assets/templates/admin/coupons/_form.html.erb | 8 ++++++++ config/locales/app.shared.en.yml | 1 + config/locales/app.shared.fr.yml | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/controllers/machines.coffee.erb b/app/assets/javascripts/controllers/machines.coffee.erb index 524577b67..12af6cb96 100644 --- a/app/assets/javascripts/controllers/machines.coffee.erb +++ b/app/assets/javascripts/controllers/machines.coffee.erb @@ -742,7 +742,7 @@ Application.Controllers.controller "ReserveMachineController", ["$scope", "$stat - ## + ## # Triggered when fullCalendar tries to graphicaly render an event block. # Append the event tag into the block, just after the event title. # @see http://fullcalendar.io/docs/event_rendering/eventRender/ diff --git a/app/assets/templates/admin/coupons/_form.html.erb b/app/assets/templates/admin/coupons/_form.html.erb index 2a5acddc5..37df00235 100644 --- a/app/assets/templates/admin/coupons/_form.html.erb +++ b/app/assets/templates/admin/coupons/_form.html.erb @@ -68,6 +68,10 @@ + + + {{ 'leave_empty_for_no_limit' | translate }} +
@@ -79,6 +83,10 @@ ng-disabled="mode == 'EDIT'" min="0"/> {{ 'max_usages_must_be_equal_or_greater_than_0' }} + + + {{ 'leave_empty_for_no_limit' | translate }} +
diff --git a/config/locales/app.shared.en.yml b/config/locales/app.shared.en.yml index 4aec44532..34de8a913 100644 --- a/config/locales/app.shared.en.yml +++ b/config/locales/app.shared.en.yml @@ -345,6 +345,7 @@ en: forever: "Each use" validity_per_user_is_required: "Validity per user is required." valid_until: "Valid until (included)" + leave_empty_for_no_limit: "Do not specify any limit by leaving the field empty." max_usages: "Maximum usages allowed" max_usages_must_be_equal_or_greater_than_0: "The maximum usages allowed must be greater than 0." enabled: "Active" diff --git a/config/locales/app.shared.fr.yml b/config/locales/app.shared.fr.yml index 77fe39850..a6c7afc6f 100644 --- a/config/locales/app.shared.fr.yml +++ b/config/locales/app.shared.fr.yml @@ -345,6 +345,7 @@ fr: forever: "À chaque utilisation" validity_per_user_is_required: "La validité par utilisateur est requise." valid_until: "Valable jusqu'au (inclus)" + leave_empty_for_no_limit: "Laissez vide pour ne pas spécifier de limite." max_usages: "Nombre maximum d'utilisations autorisées" max_usages_must_be_equal_or_greater_than_0: "Le nombre d'utilisations maximum doit être supérieur ou égal à 0." enabled: "Activé"