Html: Add buttonAttributes() more diligently
authorBartosz Dziewoński <matma.rex@gmail.com>
Fri, 5 Jun 2015 01:07:11 +0000 (03:07 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Fri, 5 Jun 2015 01:15:14 +0000 (01:15 +0000)
It was done only for elements generated with linkButton() or
submitButton(), and not input().

Change-Id: Idd7e01d596997bd5cade5a7851daf64bee10bb49

includes/Html.php

index 6da70b1..235096d 100644 (file)
@@ -715,6 +715,9 @@ class Html {
                if ( in_array( $type, array( 'text', 'search', 'email', 'password', 'number' ) ) ) {
                        $attribs = self::getTextInputAttributes( $attribs );
                }
+               if ( in_array( $type, array( 'button', 'reset', 'submit' ) ) ) {
+                       $attribs = self::buttonAttributes( $attribs );
+               }
                return self::element( 'input', $attribs );
        }