mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 01:43:47 +01:00
there should be no validation for disabled widgets
This commit is contained in:
parent
2cee8df131
commit
41671d733a
@ -296,7 +296,8 @@ var et2_inputWidget = et2_valueWidget.extend([et2_IInput,et2_ISubmitListener],
|
||||
var ok = true;
|
||||
|
||||
// Check for required
|
||||
if(this.options && this.options.needed && !this.options.readonly && (this.getValue() == null || this.getValue().valueOf() == ''))
|
||||
if (this.options && this.options.needed && !this.options.readonly && !this.disabled &&
|
||||
(this.getValue() == null || this.getValue().valueOf() == ''))
|
||||
{
|
||||
messages.push(this.egw().lang('Field must not be empty !!!'));
|
||||
ok = false;
|
||||
|
@ -135,7 +135,7 @@ var et2_radiobox = et2_inputWidget.extend(
|
||||
|
||||
return val == this.options.set_value ? this.options.set_value : null;
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Overridden from parent so if it's required, only 1 in a group needs a value
|
||||
*/
|
||||
@ -143,7 +143,8 @@ var et2_radiobox = et2_inputWidget.extend(
|
||||
var ok = true;
|
||||
|
||||
// Check for required
|
||||
if(this.options && this.options.needed && !this.options.readonly && (this.getValue() == null || this.getValue().valueOf() == ''))
|
||||
if (this.options && this.options.needed && !this.options.readonly && !this.disabled &&
|
||||
(this.getValue() == null || this.getValue().valueOf() == ''))
|
||||
{
|
||||
if(jQuery.isEmptyObject(this.getInstanceManager().getValues(this.getInstanceManager().widgetContainer)[this.id.replace('[]', '')]))
|
||||
{
|
||||
|
@ -120,7 +120,7 @@ var et2_template = et2_DOMWidget.extend(
|
||||
}
|
||||
|
||||
// Read the XML structure of the requested template
|
||||
this.loadFromXML(templates[template_name]);
|
||||
if (typeof templates[template_name] != 'undefined') this.loadFromXML(templates[template_name]);
|
||||
|
||||
// Update flag
|
||||
this.loading.resolve();
|
||||
|
@ -154,7 +154,7 @@ var et2_textbox = et2_inputWidget.extend([et2_IResizeable],
|
||||
{
|
||||
var ok = true;
|
||||
// Check input is valid
|
||||
if(this.options && this.options.validator && !this.options.readonly)
|
||||
if(this.options && this.options.validator && !this.options.readonly && !this.disabled)
|
||||
{
|
||||
if (typeof this.options.validator == 'string')
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user