From 8147d64cbae96ac6114e1babc2f650bf47e50138 Mon Sep 17 00:00:00 2001 From: Baptiste Wojtkowski Date: Tue, 21 Mar 2017 10:13:06 +0000 Subject: [PATCH] BUG 12310: Modified the tooltips Modified the tooltips helping the users entering monrtary information in the right format. BUG 12310: Corrected the RegExp --- koha-tmpl/intranet-tmpl/prog/en/includes/prices.inc | 5 ++++- koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/prices.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/prices.inc index 8952845..7ef7270 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/prices.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/prices.inc @@ -16,8 +16,11 @@ function Price_from_string(string){ if (!isPrice(string)) { return false; } + console.log(string); string = string.replace(/[^0-9[% Koha.Preference('DigitSeparator') %]]/g, ''); - string = string.replace(/[% Koha.Preference('DigitSeparator') %]/g, '.'); + console.log(string); + string = string.replace(/[[% Koha.Preference('DigitSeparator') %]]/g, '.'); + console.log(string); return string; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt index abcb27e..15e285a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tt @@ -378,7 +378,12 @@ - Please use the "[% Koha.Preference('DigitSeparator').substr(0,1) %]" as separator : ex "XX[% Koha.Preference('DigitSeparator').substr(0,1) %]XX" + [% IF Koha.Preference('DigitSeparator') %] + Please use the "[% Koha.Preference('DigitSeparator').substr(0,1) %]" as separator : ex "XX[% Koha.Preference('DigitSeparator').substr(0,1) %]XX", if you want to change it, click here here + + [% ELSE %] + Please chose a digit separator by clicking here + [% END %]
  • -- 2.7.4