/** * Method to get the field input markup. * * @return string The field input markup. * * @since 11.1 */ protected function getInput() { $html = parent::getInput(); $default = SibdietHelper::getDefault((int) $this->value); $class = $this->element['class'] ? ' class="control-label ' . (string) $this->element['class'] . '"' : 'control-label'; $html .= '<div' . $class . '>' . $default . '</div>'; return $html; }
protected function getInput() { $doc = JFactory::getDocument(); $doc->addScript(JURI::root(true) . '/administrator/components/com_visforms/js/itemlistcreator.js'); $texts = "{texts : {txtMoveUp: '" . addslashes(JText::_('COM_VISFORMS_ITEMLISTCREATOR_MOVE_UP')) . "'," . "txtMoveDown: '" . addslashes(JText::_('COM_VISFORMS_ITEMLISTCREATOR_MOVE_DOWN')) . "'," . "txtChange: '" . addslashes(JText::_('COM_VISFORMS_ITEMLISTCREATOR_CHANGE')) . "'," . "txtDelete: '" . addslashes(JText::_('COM_VISFORMS_DEL')) . "'," . "txtClose: '" . addslashes(JText::_('COM_VISFORMS_ITEMLISTCREATOR_CLOSE')) . "'," . "txtAddItem: '" . addslashes(JText::_('COM_VISFORMS_ADD')) . "'," . "txtCreateItem: '" . addslashes(JText::_('COM_VISFORMS_ITEMLISTCREATOR_CREATE_NEW_ITEM')) . "'," . "txtReset: '" . addslashes(JText::_('COM_VISFORMS_ITEMLISTCREATOR_RESET')) . "'," . "txtSave: '" . addslashes(JText::_('COM_VISFORMS_ITEMLISTCREATOR_SAVE')) . "'," . "txtJYes: '" . addslashes(JText::_('JYES')) . "'," . "txtJNo: '" . addslashes(JText::_('JNO')) . "'," . "txtAlertRequired: '" . addslashes(JText::_('COM_VISFORMS_ITEMLISTCREATOR_REQUIRED_LABEL_VALUE')) . "'," . "txtValue: '" . addslashes(JText::_('COM_VISFORMS_VALUE')) . "'," . "txtLabel: '" . addslashes(JText::_('COM_VISFORMS_LABEL')) . "'," . "txtDefault: '" . addslashes(JText::_('COM_VISFORMS_DEFAULT')) . "'" . "}," . " params: {fieldName : '" . $this->fieldname . "'}" . "}"; $script = 'var visformsItemlistCreator' . $this->fieldname . ' = jQuery(document).ready(function() {jQuery("#item-form").visformsItemlistCreator(' . $texts . ')});'; $doc->addScriptDeclaration($script); $hiddenInput = parent::getInput(); $html = $hiddenInput; return $html; }
/** * Method to get the field input markup for a generic list. * Use the multiple attribute to enable multiselect. * * @return string The field input markup. * * @since 11.1 */ protected function getInput() { return parent::getInput() . "\n" . $this->getMegaMenuMarkup(); }