URL: https://github.com/freeipa/freeipa/pull/331 Author: pvomacka Title: #331: WebUI: don't change casing of Auth Indicators values Action: synchronized
To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/331/head:pr331 git checkout pr331
From ba9275309b1f69a4f5d0f9d478cbd3a6f78310be Mon Sep 17 00:00:00 2001 From: Pavel Vomacka <pvoma...@redhat.com> Date: Tue, 13 Dec 2016 13:21:29 +0100 Subject: [PATCH 1/2] 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 --- install/ui/src/freeipa/widget.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js index 6ad8aad..bb3450e 100644 --- a/install/ui/src/freeipa/widget.js +++ b/install/ui/src/freeipa/widget.js @@ -2509,6 +2509,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 || @@ -2626,7 +2628,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); } From a05d927a095fc17ed767f064cb032d52bbc95143 Mon Sep 17 00:00:00 2001 From: Pavel Vomacka <pvoma...@redhat.com> Date: Tue, 13 Dec 2016 13:25:48 +0100 Subject: [PATCH 2/2] WebUI: don't change casing of Auth Indicators values All values were previously converted to lowercase which was not coresponding with CLI behaviour. Now they stay as they are inserted. I also have to change the strings to lowercase because the otp and radius should be inserted as lowercase words. https://fedorahosted.org/freeipa/ticket/6308 --- install/ui/src/freeipa/host.js | 4 ++-- install/ui/src/freeipa/service.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/install/ui/src/freeipa/host.js b/install/ui/src/freeipa/host.js index 87cf264..5dc49b8 100644 --- a/install/ui/src/freeipa/host.js +++ b/install/ui/src/freeipa/host.js @@ -123,11 +123,11 @@ return { add_field_label: '@i18n:authtype.auth_indicator', options: [ { - label: '@i18n:authtype.otp', + label: 'otp', value: 'otp' }, { - label: '@i18n:authtype.type_radius', + label: 'radius', value: 'radius' } ], diff --git a/install/ui/src/freeipa/service.js b/install/ui/src/freeipa/service.js index a6607d2..68beb17 100644 --- a/install/ui/src/freeipa/service.js +++ b/install/ui/src/freeipa/service.js @@ -133,11 +133,11 @@ return { add_field_label: '@i18n:authtype.auth_indicator', options: [ { - label: '@i18n:authtype.otp', + label: 'otp', value: 'otp' }, { - label: '@i18n:authtype.type_radius', + label: 'radius', value: 'radius' } ],
-- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code