/** * Returns the HTML code to be included in the output page for this input. * * Ideally this HTML code should provide a basic functionality even if the * browser is not Javascript capable. I.e. even without Javascript the user * should be able to input values. * */ public function getHtmlText() { global $wgUser, $wgTitle; global $sfigSettings; // first: set up HTML attributes $inputFieldDisabled = array_key_exists('disable input field', $this->mOtherArgs) || $this->mIsDisabled || $sfigSettings->menuSelectDisableInputField && !array_key_exists('enable input field', $this->mOtherArgs); // second: assemble HTML // create visible input field (for display) and invisible field (for data) $html = SFIUtils::textHTML($this->mCurrentValue, '', $inputFieldDisabled, $this->mOtherArgs, "input_{$this->mInputNumber}_show", null, "createboxInput") . Xml::element("input", array('id' => "input_{$this->mInputNumber}", 'type' => 'hidden', 'name' => $this->mInputName, 'value' => $this->mCurrentValue)); $html .= "<span class='SFI_menuselect' id='span_{$this->mInputNumber}_tree'>"; // parse menu structure $parser = new Parser(); // FIXME: SF does not parse options correctly. Users have to replace | by {{!}} $structure = str_replace('{{!}}', '|', $this->mOtherArgs['structure']); $options = ParserOptions::newFromUser($wgUser); $structure = $parser->parse($structure, $wgTitle, $options)->getText(); $html .= str_replace('<li', '<li class=\'ui-state-default\'', $structure); $html .= "</span>"; // wrap in span (e.g. used for mandatory inputs) $html = '<span class="inputSpan' . ($this->mIsMandatory ? ' mandatoryFieldSpan' : '') . '">' . $html . '</span>'; return $html; }
/** * Returns the HTML code to be included in the output page for this input. * * Ideally this HTML code should provide a basic functionality even if the * browser is not JavaScript capable. I.e. even without JavaScript the user * should be able to input values. * */ public function getHtmlText() { global $sfigSettings; // SFI variables // should the input field be disabled? $inputFieldDisabled = array_key_exists('disable input field', $this->mOtherArgs) || !array_key_exists('enable input field', $this->mOtherArgs) && $sfigSettings->datePickerDisableInputField || $this->mIsDisabled; // assemble HTML code $html = SFIUtils::textHTML($this->mCurrentValue, $this->mInputName, $inputFieldDisabled, $this->mOtherArgs, 'input_' . $this->mInputNumber); if (!array_key_exists('part of dtp', $this->mOtherArgs)) { // wrap in span (e.g. used for mandatory inputs) $class = array_key_exists('mandatory', $this->mOtherArgs) ? 'inputSpan mandatoryFieldSpan' : 'inputSpan'; $html = Xml::tags('span', array('class' => $class), $html); } return $html; }
/** * Returns the HTML code to be included in the output page for this input. * * Ideally this HTML code should provide a basic functionality even if the * browser is not Javascript capable. I.e. even without Javascript the user * should be able to input values. * */ public function getHtmlText() { global $sfigSettings; // first: set up HTML attributes $inputFieldDisabled = array_key_exists('disable input field', $this->mOtherArgs) || !array_key_exists('enable input field', $this->mOtherArgs) && $sfigSettings->timePickerDisableInputField || $this->mIsDisabled; // second: assemble HTML // create visible input field (for display) and invisible field (for data) $html = SFIUtils::textHTML($this->mCurrentValue, $this->mInputName, $inputFieldDisabled, $this->mOtherArgs, 'input_' . $this->mInputNumber); // wrap in span (e.g. used for mandatory inputs) if (!array_key_exists('part of dtp', $this->mOtherArgs)) { $html = '<span class="inputSpan' . (array_key_exists('mandatory', $this->mOtherArgs) ? ' mandatoryFieldSpan' : '') . '">' . $html . '</span>'; } return $html; }
/** * Returns the HTML code to be included in the output page for this input. * * Ideally this HTML code should provide a basic functionality even if the * browser is not Javascript capable. I.e. even without Javascript the user * should be able to input values. * */ public function getHtmlText() { global $sfigSettings; // should the input field be disabled? $inputFieldDisabled = array_key_exists('disable input field', $this->mOtherArgs) || !array_key_exists('enable input field', $this->mOtherArgs) && $sfigSettings->datePickerDisableInputField || $this->mIsDisabled; $html = '<span class="inputSpan' . (array_key_exists('mandatory', $this->mOtherArgs) ? ' mandatoryFieldSpan' : '') . '">' . SFIUtils::textHTML($this->mCurrentValue, $this->mInputName, $inputFieldDisabled, $this->mOtherArgs, 'input_' . $this->mInputNumber) . '</span>'; return $html; }