mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
WebUI: Allow disabling lowering text in custom_checkbox_widget
Add new attribute which keeps information whether each text added using custom_checkbox_widget shoud be transformed to lowercase. Part of: https://fedorahosted.org/freeipa/ticket/6308 Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
committed by
David Kupka
parent
56a2642af0
commit
0220fc8986
@@ -546,6 +546,9 @@ aci.attributes_widget = function(spec) {
|
||||
spec.add_field_label = spec.add_field_label ||
|
||||
'@i18n:objects.permission.attribute';
|
||||
|
||||
spec.set_value_to_lowercase = spec.set_value_to_lowercase === undefined ?
|
||||
true : spec.set_value_to_lowercase;
|
||||
|
||||
var that = IPA.custom_checkboxes_widget(spec);
|
||||
|
||||
that.object_type = spec.object_type;
|
||||
|
||||
@@ -2502,6 +2502,8 @@ IPA.custom_checkboxes_widget = function(spec) {
|
||||
|
||||
var that = IPA.checkboxes_widget(spec);
|
||||
|
||||
that.set_value_to_lowercase = spec.set_value_to_lowercase || false;
|
||||
|
||||
that.add_dialog_title = spec.add_dialog_title ||
|
||||
"@i18n:dialogs.add_custom_value";
|
||||
that.add_field_label = spec.add_field_label ||
|
||||
@@ -2619,7 +2621,7 @@ IPA.custom_checkboxes_widget = function(spec) {
|
||||
|
||||
if (!value || value === '') continue;
|
||||
|
||||
value = value.toLowerCase();
|
||||
if (that.set_value_to_lowercase) value = value.toLowerCase();
|
||||
that.values.push(value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user