From 239d68b48d6667caf4166120e19504a3f29881eb Mon Sep 17 00:00:00 2001 From: Matthew Flaschen Date: Fri, 27 May 2016 17:04:01 -0700 Subject: [PATCH] OOUI HTMLForm: Allow specifying whether buttons are framed Bug: T136361 Change-Id: Ic31f857c749d62a32cafae68dc3f1cbd86e1e382 --- includes/htmlform/HTMLForm.php | 2 ++ includes/htmlform/OOUIHTMLForm.php | 1 + 2 files changed, 3 insertions(+) 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 ); } -- 2.20.1