2013-11-19 12:55:50 +00:00
|
|
|
<?php
|
2013-11-19 13:08:16 +00:00
|
|
|
|
2013-11-19 12:55:50 +00:00
|
|
|
/**
|
|
|
|
|
* 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';
|
2015-06-25 12:56:05 +00:00
|
|
|
|
2016-02-17 09:09:32 +00:00
|
|
|
protected $mFlags = [ 'primary', 'constructive' ];
|
2016-04-01 12:12:06 +00:00
|
|
|
|
|
|
|
|
public function skipLoadData( $request ) {
|
|
|
|
|
return !$request->getCheck( $this->mName );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function loadDataFromRequest( $request ) {
|
|
|
|
|
return $request->getCheck( $this->mName );
|
|
|
|
|
}
|
2013-11-19 13:08:16 +00:00
|
|
|
}
|