Permalink
Browse files

required = false is rendered anyway on HTML5 browsers.

On HTML5 browsers the tag "required" is rendered despise of the fact that is it set to false. With this change the key 'required' is not set, meaning that the function Zend\Dojo\View\Helper\Dojo\Container::registerDijitLoader() will not add it to the zendDijits json array.
  • Loading branch information...
1 parent 0a8b7db commit 2cef17ef5feec3e6b39ab137e9c01c23feaff3e3 @rsandrea committed Mar 24, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 library/Zend/Dojo/Form/Decorator/DijitElement.php
@@ -169,8 +169,11 @@ public function render($content)
$name = $element->getFullyQualifiedName();
$dijitParams = $this->getDijitParams();
- $dijitParams['required'] = $element->isRequired();
-
+
+ if ($element->isRequired()) {
+ $dijitParams['required'] = true;
+ }
+
$id = $element->getId();
if ($view->plugin('dojo')->hasDijit($id)) {
trigger_error(sprintf('Duplicate dijit ID detected for id "%s; temporarily generating uniqid"', $id), E_USER_NOTICE);

0 comments on commit 2cef17e

Please sign in to comment.