diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2011-11-25 14:44:40 +0100 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2011-12-05 16:01:29 +0000 |
commit | 6e3a21a1155b620a2362bfb40a139a8f0dc3b5c5 (patch) | |
tree | 34aa382b0497c6c9f4496c8e77f5591fff320ca8 /install | |
parent | e271e80f7d75095bef75de2ce17bfd4eef1ace63 (diff) | |
download | freeipa-6e3a21a1155b620a2362bfb40a139a8f0dc3b5c5.tar.gz freeipa-6e3a21a1155b620a2362bfb40a139a8f0dc3b5c5.tar.xz freeipa-6e3a21a1155b620a2362bfb40a139a8f0dc3b5c5.zip |
Separation of writable update from field load method
Diffstat (limited to 'install')
-rw-r--r-- | install/ui/field.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/install/ui/field.js b/install/ui/field.js index c1b74ab5d..850afceeb 100644 --- a/install/ui/field.js +++ b/install/ui/field.js @@ -187,6 +187,13 @@ IPA.field = function(spec) { that.values = ['']; } + that.load_writable(record); + + that.reset(); + }; + + that.load_writable = function(record) { + that.writable = true; if (that.metadata) { @@ -199,14 +206,12 @@ IPA.field = function(spec) { } } - if (that.record.attributelevelrights) { - var rights = that.record.attributelevelrights[that.name]; + if (record.attributelevelrights) { + var rights = record.attributelevelrights[that.name]; if (!rights || rights.indexOf('w') < 0) { that.writable = false; } } - - that.reset(); }; that.reset = function() { |