mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
Form: allow checkboxes to be required
This commit is contained in:
parent
f872a95cc5
commit
568619b92e
@ -1015,7 +1015,7 @@ class Form extends Zend_Form
|
||||
*/
|
||||
public function ensureElementAccessibility(Zend_Form_Element $element)
|
||||
{
|
||||
if ($element->isRequired() && strpos(strtolower($element->getType()), 'checkbox') === false) {
|
||||
if ($element->isRequired()) {
|
||||
$element->setAttrib('aria-required', 'true'); // ARIA
|
||||
$element->setAttrib('required', ''); // HTML5
|
||||
if (($cue = $this->getRequiredCue()) !== null && ($label = $element->getDecorator('label')) !== false) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user