summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2014-04-24 16:37:38 +0200
committerPetr Vobornik <pvoborni@redhat.com>2014-04-29 18:10:36 +0200
commit923c7ab7bc0eb361dae6e6fb3f05854499625368 (patch)
tree03ff1c8fb721bd8644d2a3a362d51ec4a7610b3b /install
parent6aeb138e46044f6d2f124dfc3988391cf4906242 (diff)
downloadfreeipa-923c7ab7bc0eb361dae6e6fb3f05854499625368.tar.gz
freeipa-923c7ab7bc0eb361dae6e6fb3f05854499625368.tar.xz
freeipa-923c7ab7bc0eb361dae6e6fb3f05854499625368.zip
webui: regression - enable fields on idrange type change (add)
ID range adder was not properly addressed in field binding refactoring. The usage of reset caused some weird loops. https://fedorahosted.org/freeipa/ticket/4326 Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
Diffstat (limited to 'install')
-rw-r--r--install/ui/src/freeipa/idrange.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/install/ui/src/freeipa/idrange.js b/install/ui/src/freeipa/idrange.js
index d92ba7359..c7dc5c683 100644
--- a/install/ui/src/freeipa/idrange.js
+++ b/install/ui/src/freeipa/idrange.js
@@ -19,6 +19,7 @@
*/
define([
+ 'dojo/on',
'./ipa',
'./jquery',
'./phases',
@@ -27,7 +28,7 @@ define([
'./search',
'./association',
'./entity'],
- function(IPA, $, phases, reg) {
+ function(on, IPA, $, phases, reg) {
var exp = IPA.idrange = {};
@@ -171,7 +172,7 @@ IPA.idrange_adder_policy = function(spec) {
}
function disable(field) {
- field.reset();
+ field.set_value(['']); // avoid usage of reset() to break event handler loop
field.set_required(false);
field.set_enabled(false);
}
@@ -195,9 +196,9 @@ IPA.idrange_adder_policy = function(spec) {
require(secondarybaserid_f);
}
- type_f.widget.value_changed.attach(that.on_input_change);
- baserid_f.widget.value_changed.attach(that.on_input_change);
- secondarybaserid_f.widget.value_changed.attach(that.on_input_change);
+ on(type_f, 'value-change', that.on_input_change);
+ on(baserid_f, 'value-change', that.on_input_change);
+ on(secondarybaserid_f, 'value-change', that.on_input_change);
};
that.on_input_change = function() {
@@ -206,9 +207,9 @@ IPA.idrange_adder_policy = function(spec) {
var secondarybaserid_f = that.container.fields.get_field('ipasecondarybaserid');
var trusteddomainsid_f = that.container.fields.get_field('ipanttrusteddomainsid');
- var type_v = type_f.save()[0];
- var baserid_v = baserid_f.save()[0] || '';
- var secondarybaserid_v = secondarybaserid_f.save()[0] || '';
+ var type_v = type_f.get_value()[0];
+ var baserid_v = baserid_f.get_value()[0] || '';
+ var secondarybaserid_v = secondarybaserid_f.get_value()[0] || '';
var is_ad_range = (type_v === 'ipa-ad-trust' || type_v === 'ipa-ad-trust-posix');