function getInputHTML($value) { $datalist = new XmlSelect(false, $this->mName . '-datalist'); $datalist->setTagName('datalist'); $datalist->addOptions($this->getOptions()); return parent::getInputHTML($value) . $datalist->getHTML(); }
public function getInputHtml($value) { // add mw-searchInput class to enable search suggestions for non-OOUI, too $this->mClass .= 'mw-searchInput'; // return the HTMLTextField html return parent::getInputHTML($value); }
public function getInputHtml($value) { // add the required module and css class for user suggestions in non-OOUI mode $this->mParent->getOutput()->addModules('mediawiki.userSuggest'); $this->mClass .= ' mw-autocomplete-user'; // return parent html return parent::getInputHTML($value); }
/** * @param $value * @return string */ function getInputHTML( $value ) { $input = parent::getInputHTML( $value ); if ( isset( $this->mParams['select'] ) ) { $input = $this->mParams['select']->getHtmlAndPrepareJs() . '<br />' . $input; } return $input; }
/** * @param $value * @return string */ function getInputHTML($value) { $input = parent::getInputHTML($value); if (isset($this->mParams['select'])) { /** * @var JsSelectToInput $select */ $select = $this->mParams['select']; $input = $select->getHtmlAndPrepareJs() . '<br />' . $input; } return $input; }
function getInputHTML($value) { $oldClass = $this->mClass; $this->mClass = (array) $this->mClass; $valInSelect = false; $ret = ''; if ($this->getOptions()) { if ($value !== false) { $value = strval($value); $valInSelect = in_array($value, HTMLFormField::flattenOptions($this->getOptions()), true); } $selected = $valInSelect ? $value : 'other'; $select = new XmlSelect($this->mName . '-select', $this->mID . '-select', $selected); $select->addOptions($this->getOptions()); $select->setAttribute('class', 'mw-htmlform-select-or-other'); if (!empty($this->mParams['disabled'])) { $select->setAttribute('disabled', 'disabled'); } if (isset($this->mParams['tabindex'])) { $select->setAttribute('tabindex', $this->mParams['tabindex']); } $ret = $select->getHTML() . "<br />\n"; $this->mClass[] = 'mw-htmlform-hide-if'; } if ($valInSelect) { $value = ''; } else { $key = array_search(strval($value), $this->autocomplete, true); if ($key !== false) { $value = $key; } } $this->mClass[] = 'mw-htmlform-autocomplete'; $ret .= parent::getInputHTML($valInSelect ? '' : $value); $this->mClass = $oldClass; return $ret; }
public function getInputHTML($value) { return $this->mClassWithButton->getElement(parent::getInputHTML($value)); }
function getInputHTML($value) { $value = explode('T', wfTimestamp(TS_ISO_8601, strtotime($value))); return parent::getInputHTML($value[0]); }