3 * Adds a generic button inline to the form. Does not do anything, you must add
4 * click handling code in JavaScript. Use a HTMLSubmitField if you merely
5 * wish to add a submit button to a form.
9 class HTMLButtonField
extends HTMLFormField
{
10 protected $buttonType = 'button';
12 public function __construct( $info ) {
13 $info[ 'nodata' ] = true;
14 parent
::__construct( $info );
17 public function getInputHTML( $value ) {
19 'class' => 'mw-htmlform-submit ' . $this->mClass
,
23 if ( ! empty( $this->mParams
[ 'disabled' ] ) ) {
24 $attr[ 'disabled' ] = 'disabled';
27 return Html
::input( $this->mName
, $value, $this->buttonType
, $attr );
30 protected function needsLabel() {
35 * Button cannot be invalid
37 * @param $value String
38 * @param $alldata Array
42 public function validate( $value, $alldata ) {