diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2011-10-04 18:38:08 +0200 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2011-10-06 13:14:51 +0200 |
commit | 95b85f907b96bde5907e8190fac262ff869b2b03 (patch) | |
tree | 8347077be505b7537ad7dc3f2b7dbafa11db90a8 /install/ui/widget.js | |
parent | 5b968f96328a3044c89d2499b91aa38aa9cf0c80 (diff) | |
download | freeipa-95b85f907b96bde5907e8190fac262ff869b2b03.tar.gz freeipa-95b85f907b96bde5907e8190fac262ff869b2b03.tar.xz freeipa-95b85f907b96bde5907e8190fac262ff869b2b03.zip |
Disables gid field if not posix group in group adder dialog
https://fedorahosted.org/freeipa/ticket/1922
gidNumber is not an allowed attribute for a non-posix group. When adding a non-posix group from the UI, unchecking the "Is this a POSIX group?:" box should disable the "GID:" field.
Diffstat (limited to 'install/ui/widget.js')
-rw-r--r-- | install/ui/widget.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/install/ui/widget.js b/install/ui/widget.js index 7acaf9a3e..e34f2ea08 100644 --- a/install/ui/widget.js +++ b/install/ui/widget.js @@ -468,6 +468,15 @@ IPA.text_widget = function(spec) { } }; + that.set_enabled = function(value) { + + if(value) { + that.input.removeAttr('disabled'); + } else { + that.input.attr('disabled', 'disabled'); + } + }; + // methods that should be invoked by subclasses that.text_load = that.load; @@ -771,6 +780,7 @@ IPA.checkbox_widget = function (spec) { // default value that.checked = spec.checked || false; + that.value_changed = IPA.observer(); that.create = function(container) { @@ -785,6 +795,7 @@ IPA.checkbox_widget = function (spec) { title: that.tooltip, change: function() { that.set_dirty(that.test_dirty()); + that.value_changed.notify(that.save(), that); } }).appendTo(container); |