diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2012-04-30 15:55:12 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2012-05-11 18:30:48 +0200 |
commit | 472f9fc5aad845afa335786599ba75603c006d31 (patch) | |
tree | 56709ff36de76571e4c6877fb044722bbef9ba39 /install/ui/sudo.js | |
parent | 719b09fb4edf990beb07ab72bcd4d5e102975637 (diff) | |
download | freeipa-472f9fc5aad845afa335786599ba75603c006d31.tar.gz freeipa-472f9fc5aad845afa335786599ba75603c006d31.tar.xz freeipa-472f9fc5aad845afa335786599ba75603c006d31.zip |
Consistent change of entry status.
This patch adds action list and control buttons for consistent change of enty status for user, hbac rules, sudo rules, SELinux maps and dns zones.
Action lists with 'enable' and 'disable' and 'delete' options were added to details facets.
Two control buttons: 'enable' and 'disable' were added to search facets.
https://fedorahosted.org/freeipa/ticket/2247
Diffstat (limited to 'install/ui/sudo.js')
-rw-r--r-- | install/ui/sudo.js | 61 |
1 files changed, 42 insertions, 19 deletions
diff --git a/install/ui/sudo.js b/install/ui/sudo.js index 4fdcc52d1..1fa768573 100644 --- a/install/ui/sudo.js +++ b/install/ui/sudo.js @@ -24,8 +24,7 @@ IPA.sudo = { //priority of commands in details facet - remove_method_priority: IPA.config.default_priority - 1, - enable_priority: IPA.config.default_priority + 1 + remove_method_priority: IPA.config.default_priority - 1 }; IPA.sudo.rule_entity = function(spec) { @@ -45,12 +44,51 @@ IPA.sudo.rule_entity = function(spec) { formatter: IPA.boolean_status_formatter() }, 'description' - ] + ], + control_buttons: { + buttons: [ + { + name: 'disable', + label: IPA.messages.buttons.disable, + icon: 'disabled-icon', + needs_confirm: true, + action: { + factory: IPA.batch_items_action, + method: 'disable', + enable_cond: ['item-selected'] + } + }, + { + name: 'enable', + label: IPA.messages.buttons.enable, + icon: 'enabled-icon', + needs_confirm: true, + action: { + factory: IPA.batch_items_action, + method: 'enable', + enable_cond: ['item-selected'] + } + } + ] + } }). details_facet({ factory: IPA.sudorule_details_facet, entity: that, - command_mode: 'info' + command_mode: 'info', + action_list: { + factory: IPA.action_list_widget, + name: 'action', + state_evaluator: { + factory: IPA.enable_state_evaluator, + field: 'ipaenabledflag' + }, + actions: [ + IPA.enable_action, + IPA.disable_action, + IPA.delete_action + ] + } }). adder_dialog({ fields: [ 'cn' ] @@ -201,13 +239,6 @@ IPA.sudorule_details_facet = function(spec) { type: 'textarea', name: 'description', widget: 'general.description' - }, - { - type: 'enable', - name: 'ipaenabledflag', - label: IPA.messages.status.label, - priority: IPA.sudo.enable_priority, - widget: 'general.ipaenabledflag' } ]; @@ -223,14 +254,6 @@ IPA.sudorule_details_facet = function(spec) { { type: 'textarea', name: 'description' - }, - { - type: 'enable', - name: 'ipaenabledflag', - options: [ - { value: 'TRUE', label: IPA.messages.status.enabled }, - { value: 'FALSE', label: IPA.messages.status.disabled } - ] } ] } |