OOUI HTMLForm: Allow specifying whether buttons are framed
authorMatthew Flaschen <mflaschen@wikimedia.org>
Sat, 28 May 2016 00:04:01 +0000 (17:04 -0700)
committerMatthew Flaschen <mflaschen@wikimedia.org>
Sat, 28 May 2016 00:04:01 +0000 (17:04 -0700)
Bug: T136361
Change-Id: Ic31f857c749d62a32cafae68dc3f1cbd86e1e382

includes/htmlform/HTMLForm.php
includes/htmlform/OOUIHTMLForm.php

index e891c9c..de3e0ae 100644 (file)
@@ -894,6 +894,7 @@ class HTMLForm extends ContextSource {
         *  - id: (string, optional) DOM id for the button.
         *  - attribs: (array, optional) Additional HTML attributes.
         *  - flags: (string|string[], optional) OOUI flags.
+        *  - framed: (boolean=true, optional) OOUI framed attribute.
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
        public function addButton( $data ) {
@@ -922,6 +923,7 @@ class HTMLForm extends ContextSource {
                        'id' => null,
                        'attribs' => null,
                        'flags' => null,
+                       'framed' => true,
                ];
 
                return $this;
index 711750b..e5e2d7c 100644 (file)
@@ -117,6 +117,7 @@ class OOUIHTMLForm extends HTMLForm {
                                'value' => $button['value'],
                                'label' => $label,
                                'flags' => $button['flags'],
+                               'framed' => $button['framed'],
                                'useInputTag' => $isBadIE,
                        ] + $attrs );
                }