diff options
author | Endi S. Dewata <edewata@redhat.com> | 2011-01-28 16:46:19 -0500 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2011-01-29 13:36:03 -0500 |
commit | e806f32caeb517b12154bc1c02b8ad55b5b40f2d (patch) | |
tree | f2d2d946ad9ced5f317ad6eb3881340fd4298905 /install/ui/add.js | |
parent | f72d8e506a82dc558f89a4d115f3aad261655ba8 (diff) | |
download | freeipa-e806f32caeb517b12154bc1c02b8ad55b5b40f2d.tar.gz freeipa-e806f32caeb517b12154bc1c02b8ad55b5b40f2d.tar.xz freeipa-e806f32caeb517b12154bc1c02b8ad55b5b40f2d.zip |
Add permission dialog adjustments.
The IPA.dialog has been modified to support sections. The add
dialog for permission has been modified to include the target
section. The base dialog classes have been moved from widget.js
into a new file called dialog.js.
This patch also includes ayoung's fix for parameter name and
format for the permission attributes.
https://fedorahosted.org/freeipa/ticket/791
Diffstat (limited to 'install/ui/add.js')
-rw-r--r-- | install/ui/add.js | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/install/ui/add.js b/install/ui/add.js index 33712b45..2f5dff99 100644 --- a/install/ui/add.js +++ b/install/ui/add.js @@ -102,11 +102,13 @@ IPA.add_dialog = function (spec) { on_error: on_error }); + var field, value; + for (var i=0; i<that.fields.length; i++) { - var field = that.fields[i]; + field = that.fields[i]; if (!field.valid) return; - var value = record[field.name]; + value = record[field.name]; if (!value) continue; if (field.name == pkey_name) { @@ -116,6 +118,24 @@ IPA.add_dialog = function (spec) { } } + for (var j=0; j<that.sections.length; j++) { + var section = that.sections[j]; + + for (var k=0; k<section.fields.length; k++) { + field = section.fields[k]; + if (!field.valid) return; + + value = record[field.name]; + if (!value) continue; + + if (field.name == pkey_name) { + command.add_arg(value); + } else { + command.set_option(field.name, value); + } + } + } + //alert(JSON.stringify(command.to_json())); command.execute(); |