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
This commit is contained in:
Endi S. Dewata
2011-10-19 18:11:09 -02:00
parent b4ebcad0e0
commit 09f3e9869a
15 changed files with 381 additions and 341 deletions

View File

@@ -124,14 +124,14 @@ IPA.entity_factories.host = function () {
{
factory: IPA.widget,
name: 'fqdn',
optional: true,
required: false,
hidden: true
},
{
factory: IPA.text_widget,
name: 'hostname',
label: IPA.messages.objects.service.host,
param_info: { required: true }
required: true
},
{
factory: IPA.dnszone_select_widget,
@@ -139,7 +139,7 @@ IPA.entity_factories.host = function () {
label: IPA.metadata.objects.dnszone.label_singular,
editable: true,
empty_option: false,
param_info: { required: true }
required: true
}
]
},
@@ -190,12 +190,22 @@ IPA.host_fqdn_section = function(spec) {
text: hostname.label
}).appendTo(tr);
$('<span/>', {
'class': 'required-indicator',
text: IPA.required_indicator
}).appendTo(th);
th = $('<th/>', {
'class': 'dnszone',
title: dnszone.label,
text: dnszone.label
}).appendTo(tr);
$('<span/>', {
'class': 'required-indicator',
text: IPA.required_indicator
}).appendTo(th);
tr = $('<tr/>').appendTo(table);
var td = $('<td/>', {
@@ -256,7 +266,7 @@ IPA.host_adder_dialog = function(spec) {
var that = IPA.add_dialog(spec);
that.create = function() {
that.dialog_create();
that.add_dialog_create();
that.container.addClass('host-adder-dialog');
};