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
19 lines
461 B
PHP
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 );
|
|
}
|
|
}
|