diff options
Diffstat (limited to 'www/wiki/includes/htmlform/fields/HTMLSubmitField.php')
-rw-r--r-- | www/wiki/includes/htmlform/fields/HTMLSubmitField.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/www/wiki/includes/htmlform/fields/HTMLSubmitField.php b/www/wiki/includes/htmlform/fields/HTMLSubmitField.php new file mode 100644 index 00000000..0c33ad94 --- /dev/null +++ b/www/wiki/includes/htmlform/fields/HTMLSubmitField.php @@ -0,0 +1,19 @@ +<?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', 'progressive' ]; + + public function skipLoadData( $request ) { + return !$request->getCheck( $this->mName ); + } + + public function loadDataFromRequest( $request ) { + return $request->getCheck( $this->mName ); + } +} |