2013-11-19 12:55:50 +00:00
|
|
|
<?php
|
2013-11-19 13:08:16 +00:00
|
|
|
|
2024-02-08 15:30:18 +00:00
|
|
|
namespace MediaWiki\HTMLForm\Field;
|
|
|
|
|
|
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).
|
2020-07-10 19:23:59 +00:00
|
|
|
*
|
|
|
|
|
* @stable to extend
|
2013-11-19 12:55:50 +00:00
|
|
|
*/
|
|
|
|
|
class HTMLSubmitField extends HTMLButtonField {
|
2024-09-13 20:19:49 +00:00
|
|
|
/** @inheritDoc */
|
2013-11-19 12:55:50 +00:00
|
|
|
protected $buttonType = 'submit';
|
2015-06-25 12:56:05 +00:00
|
|
|
|
2024-09-13 20:19:49 +00:00
|
|
|
/** @inheritDoc */
|
2016-09-30 20:18:52 +00:00
|
|
|
protected $mFlags = [ 'primary', 'progressive' ];
|
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
|
|
|
}
|
2024-02-08 15:30:18 +00:00
|
|
|
|
2024-03-07 21:56:58 +00:00
|
|
|
/** @deprecated class alias since 1.42 */
|
2024-02-08 15:30:18 +00:00
|
|
|
class_alias( HTMLSubmitField::class, 'HTMLSubmitField' );
|