From 09f3e9869a27adc8c07c305a2aa5107690aa1d04 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Wed, 19 Oct 2011 18:11:09 -0200 Subject: Fixed inconsistent required/optional attributes. The dialogs and details pages have been modified to use the * symbol to mark required fields. The automount map and the DNS zone dialogs have been modified to update the required fields according to the input type. Ticket #1696, #1973 --- install/ui/automount.js | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'install/ui/automount.js') diff --git a/install/ui/automount.js b/install/ui/automount.js index 89b0f6b7..6b740d8e 100644 --- a/install/ui/automount.js +++ b/install/ui/automount.js @@ -144,17 +144,17 @@ IPA.entity_factories.automountkey = function() { entity({ name: 'automountkey' }). containing_entity('automountmap'). details_facet({ - sections:[ + sections: [ { name:'identity', label: IPA.messages.details.identity, - fields:[ + fields: [ { - factory: IPA.text_widget, - read_only: true, - name: 'automountkey' + name: 'automountkey', + read_only: true }, - 'automountinformation'] + 'automountinformation' + ] } ], disable_breadcrumb: false, @@ -224,20 +224,26 @@ IPA.automountmap_adder_dialog = function(spec) { var that = IPA.add_dialog(spec); that.create = function() { - that.dialog_create(); + that.add_dialog_create(); var method_field = that.get_field('method'); + var indirect_section = that.get_section('indirect'); + var key_field = that.get_field('key'); var direct_input = $('input[value="add"]', method_field.container); direct_input.change(function() { that.method = 'add'; - that.get_section('indirect').set_visible(false); + + key_field.set_required(false); + indirect_section.set_visible(false); }); var indirect_input = $('input[value="add_indirect"]', method_field.container); indirect_input.change(function() { that.method = 'add_indirect'; - that.get_section('indirect').set_visible(true); + + key_field.set_required(true); + indirect_section.set_visible(true); }); direct_input.click(); -- cgit