From 472f9fc5aad845afa335786599ba75603c006d31 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Mon, 30 Apr 2012 15:55:12 +0200 Subject: 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 --- install/ui/dns.js | 55 +++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 43 insertions(+), 12 deletions(-) (limited to 'install/ui/dns.js') diff --git a/install/ui/dns.js b/install/ui/dns.js index 0d7f03f20..7b436c720 100644 --- a/install/ui/dns.js +++ b/install/ui/dns.js @@ -102,24 +102,42 @@ IPA.dns.zone_entity = function(spec) { label: IPA.messages.status.label, formatter: IPA.boolean_status_formatter() } - ] + ], + 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.dnszone_details_facet, command_mode: 'info', - sections: [{ + sections: [ + { name: 'identity', fields: [ 'idnsname', - { - type: 'enable', - name: 'idnszoneactive', - label: IPA.messages.status.label, - options: [ - { value: 'TRUE', label: IPA.messages.status.enabled }, - { value: 'FALSE', label: IPA.messages.status.disabled } - ] - }, 'idnssoamname', 'idnssoarname', 'idnssoaserial', @@ -198,7 +216,20 @@ IPA.dns.zone_entity = function(spec) { name: 'idnsallowsyncptr' } ] - }] + }], + action_list: { + factory: IPA.action_list_widget, + name: 'action', + state_evaluator: { + factory: IPA.enable_state_evaluator, + field: 'idnszoneactive' + }, + actions: [ + IPA.enable_action, + IPA.disable_action, + IPA.delete_action + ] + } }). nested_search_facet({ factory: IPA.dns.record_search_facet, -- cgit