diff --git a/dictionaries/ui/components/input/en.dictionary.itop.input.php b/dictionaries/ui/components/input/en.dictionary.itop.input.php index 64b558258..fa2e592cc 100644 --- a/dictionaries/ui/components/input/en.dictionary.itop.input.php +++ b/dictionaries/ui/components/input/en.dictionary.itop.input.php @@ -19,6 +19,7 @@ // Input Dict::Add('EN US', 'English', 'English', array( + 'UI:Component:Input:ChangeNotAllowed' => 'This change is not allowed', 'UI:Component:Input:Password:DoesNotMatch' => 'Passwords do not match', - 'UI:Component:Input:Set:MinimumItems' => 'Minimum %1$s items required', + 'UI:Component:Input:Set:MinimumItems' => 'Minimum %1$s item(s) required', )); \ No newline at end of file diff --git a/dictionaries/ui/components/input/fr.dictionary.itop.input.php b/dictionaries/ui/components/input/fr.dictionary.itop.input.php index a8188b519..1d5b5190e 100644 --- a/dictionaries/ui/components/input/fr.dictionary.itop.input.php +++ b/dictionaries/ui/components/input/fr.dictionary.itop.input.php @@ -18,5 +18,7 @@ */ // Input Dict::Add('FR FR', 'French', 'Français', array( - 'UI:Component:Input:Password:DoesNotMatch' => 'Passwords do not match~~', + 'UI:Component:Input:ChangeNotAllowed' => 'Cette modification n\'est pas autorisée', + 'UI:Component:Input:Password:DoesNotMatch' => 'Les mots de passe ne correspondent pas', + 'UI:Component:Input:Set:MinimumItems' => 'Minimum %1$s élément(s) requis', )); \ No newline at end of file diff --git a/js/selectize/plugin_combodo_min_items.js b/js/selectize/plugin_combodo_min_items.js index c3243b71d..e70862e97 100644 --- a/js/selectize/plugin_combodo_min_items.js +++ b/js/selectize/plugin_combodo_min_items.js @@ -6,6 +6,7 @@ Selectize.define("combodo_min_items", function (aOptions) { // Plugin options aOptions = $.extend({ minItems: 0, + errorTitle: 'This change is not allowed', errorMessage: 'Minimum ' + aOptions.minItems + ' item(s) required.' }, aOptions @@ -16,7 +17,9 @@ Selectize.define("combodo_min_items", function (aOptions) { let oOriginal = oSelf.removeItem; return function () { if(oSelf.items.length <= aOptions.minItems) { - CombodoModal.OpenErrorModal(aOptions.errorMessage, []); + CombodoModal.OpenErrorModal(aOptions.errorMessage, { + title: aOptions.errorTitle + }); return; } return oOriginal.apply(this, arguments); diff --git a/templates/base/components/input/set/layout.ready.js.twig b/templates/base/components/input/set/layout.ready.js.twig index b93829107..e0eb3ed64 100644 --- a/templates/base/components/input/set/layout.ready.js.twig +++ b/templates/base/components/input/set/layout.ready.js.twig @@ -54,7 +54,8 @@ let oWidget{{ oUIBlock.GetId() }} = $('#{{ oUIBlock.GetId() }}').selectize({ {% if oUIBlock.GetMinItems() is not empty %} 'combodo_min_items' : { minItems: {{ oUIBlock.GetMinItems() }}, - errorMessage: '{{ 'UI:Component:Input:Set:MinimumItems'|dict_format(oUIBlock.GetMinItems()) }}' + errorTitle: '{{ 'UI:Component:Input:ChangeNotAllowed'|dict_s()|escape('js') }}', + errorMessage: '{{ 'UI:Component:Input:Set:MinimumItems'|dict_format(oUIBlock.GetMinItems())|escape('js') }}' }, {% endif %} },