diff --git a/install/ui/details.js b/install/ui/details.js index 564d848d4..4550c1abf 100644 --- a/install/ui/details.js +++ b/install/ui/details.js @@ -128,6 +128,18 @@ IPA.details_section = function(spec) { return false; }; + that.is_valid = function() { + var fields = that.fields.values; + var valid = true; + for (var i=0; i meta.maxvalue) { + if (meta.maxvalue !== undefined && value > meta.maxvalue) { that.valid = false; message = IPA.messages.widget.validation.max_value; message = message.replace('${value}', meta.maxvalue); @@ -131,7 +131,9 @@ IPA.widget = function(spec) { if (!values || !values.length || values[0] === '' ) { if (that.param_info && that.param_info.required && - !that.optional) { + !that.optional && + !that.read_only && + that.writable) { that.valid = false; that.show_error(IPA.messages.widget.validation.required); return false; @@ -148,10 +150,10 @@ IPA.widget = function(spec) { that.valid = true; var values = that.save(); - if (!values){ + if (!values) { return; } - if (values.length ===0 ){ + if (values.length === 0) { return; } var value = values[0]; diff --git a/ipalib/plugins/internal.py b/ipalib/plugins/internal.py index 785dc1680..0964d106c 100644 --- a/ipalib/plugins/internal.py +++ b/ipalib/plugins/internal.py @@ -355,12 +355,14 @@ class i18n_messages(Command): "confirmation":_("Confirmation"), "dirty_message":_("This page has unsaved changes. Please save or revert."), "dirty_title":_("Unsaved Changes"), - "hide_details":_("Hide details"),\ + "hide_details":_("Hide details"), "redirection":_("Redirection"), "remove_empty":_("Select entries to be removed."), "remove_title":_("Remove ${entity}"), "prospective":_("Prospective"), - "show_details":_("Show details"),\ + "show_details":_("Show details"), + "validation_title":_("Validation error"), + "validation_message":_("Input form contains invalid or missing values."), }, "facet_groups": { "managedby":_("${primary_key} is managed by:"),