diff options
author | Bartosz Dziewoński <matma.rex@gmail.com> | 2016-07-30 23:59:24 +0200 |
---|---|---|
committer | Bartosz Dziewoński <matma.rex@gmail.com> | 2016-08-01 07:58:56 +0000 |
commit | 15692fa6d4f2d7d15e3c0df8937612d9bdda93bb (patch) | |
tree | b14250670b1385a4a827cee904affc4b024ca471 /includes/htmlform/fields/HTMLTextFieldWithButton.php | |
parent | 3823c900f15d75a218286d227506ae8877e944ca (diff) | |
download | mediawikicore-15692fa6d4f2d7d15e3c0df8937612d9bdda93bb.tar.gz mediawikicore-15692fa6d4f2d7d15e3c0df8937612d9bdda93bb.zip |
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
Diffstat (limited to 'includes/htmlform/fields/HTMLTextFieldWithButton.php')
-rw-r--r-- | includes/htmlform/fields/HTMLTextFieldWithButton.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/includes/htmlform/fields/HTMLTextFieldWithButton.php b/includes/htmlform/fields/HTMLTextFieldWithButton.php new file mode 100644 index 000000000000..7c1c6739e6f6 --- /dev/null +++ b/includes/htmlform/fields/HTMLTextFieldWithButton.php @@ -0,0 +1,17 @@ +<?php +/** + * Creates a text input field with a button assigned to the input field. + */ +class HTMLTextFieldWithButton extends HTMLTextField { + /** @var HTMLFormFieldWithButton $mClassWithButton */ + protected $mClassWithButton = null; + + public function __construct( $info ) { + $this->mClassWithButton = new HTMLFormFieldWithButton( $info ); + parent::__construct( $info ); + } + + public function getInputHTML( $value ) { + return $this->mClassWithButton->getElement( parent::getInputHTML( $value ) ); + } +} |