From: Matthew Flaschen Date: Sat, 28 May 2016 00:04:01 +0000 (-0700) Subject: OOUI HTMLForm: Allow specifying whether buttons are framed X-Git-Tag: 1.31.0-rc.0~6781^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=239d68b48d6667caf4166120e19504a3f29881eb;p=lhc%2Fweb%2Fwiklou.git OOUI HTMLForm: Allow specifying whether buttons are framed Bug: T136361 Change-Id: Ic31f857c749d62a32cafae68dc3f1cbd86e1e382 --- diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index e891c9c832..de3e0ae32f 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -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; diff --git a/includes/htmlform/OOUIHTMLForm.php b/includes/htmlform/OOUIHTMLForm.php index 711750ba79..e5e2d7cb9f 100644 --- a/includes/htmlform/OOUIHTMLForm.php +++ b/includes/htmlform/OOUIHTMLForm.php @@ -117,6 +117,7 @@ class OOUIHTMLForm extends HTMLForm { 'value' => $button['value'], 'label' => $label, 'flags' => $button['flags'], + 'framed' => $button['framed'], 'useInputTag' => $isBadIE, ] + $attrs ); }