mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 08:14:03 +02:00
Do not consider disabled elements when checking form completion
Values of disabled inputs are not sent by browsers. refs #5525
This commit is contained in:
parent
6ed3d5fdbd
commit
f5ac592645
@ -245,7 +245,15 @@ class Form extends Zend_Form
|
|||||||
throw new LogicException('Forms without elements cannot be complete');
|
throw new LogicException('Forms without elements cannot be complete');
|
||||||
}
|
}
|
||||||
|
|
||||||
$missingValues = array_diff_key($elements, $formData);
|
$missingValues = array_diff_key(
|
||||||
|
array_filter(
|
||||||
|
$elements,
|
||||||
|
function ($el) {
|
||||||
|
return $el->getAttrib('disabled') === null;
|
||||||
|
}
|
||||||
|
),
|
||||||
|
$formData
|
||||||
|
);
|
||||||
return empty($missingValues);
|
return empty($missingValues);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user