wiki.techinc.nl/includes/htmlform/fields/HTMLSubmitField.php
Bartosz Dziewoński 15692fa6d4 Move HTMLFormField subclasses to a separate directory
It's getting more difficult to navigate the files in includes/htmlform/
with every new field and every new helper class that is being added.

Change-Id: I92ce2356baf6151f17b2440970d5abdf86503820
2016-08-01 07:58:56 +00:00

19 lines
461 B
PHP

<?php
/**
* Add a submit button inline in the form (as opposed to
* HTMLForm::addButton(), which will add it at the end).
*/
class HTMLSubmitField extends HTMLButtonField {
protected $buttonType = 'submit';
protected $mFlags = [ 'primary', 'constructive' ];
public function skipLoadData( $request ) {
return !$request->getCheck( $this->mName );
}
public function loadDataFromRequest( $request ) {
return $request->getCheck( $this->mName );
}
}