protected function getInput() { //ConditionalHelperAsset::load('conditional.js'); $this->class = !empty($this->class) ? $this->class . ' hp_conditional' : 'hp_conditional'; return parent::getInput(); $conditionalOn = $this->conditionalOn; }
public function getInput() { $doc = JFactory::getDocument(); $db = JFactory::getDbo(); // jQuery UI JS $doc->addScript(JURI::root(true) . '/administrator/components/com_rsmembership/assets/js/ui/core.js'); $doc->addScript(JURI::root(true) . '/administrator/components/com_rsmembership/assets/js/ui/widget.js'); $doc->addScript(JURI::root(true) . '/administrator/components/com_rsmembership/assets/js/ui/mouse.js'); $doc->addScript(JURI::root(true) . '/administrator/components/com_rsmembership/assets/js/ui/slider.js'); $doc->addScript(JURI::root(true) . '/administrator/components/com_rsmembership/assets/js/ui/datepicker.js'); $doc->addScript(JURI::root(true) . '/administrator/components/com_rsmembership/assets/js/ui/timepicker.js'); // & CSS $doc->addStyleSheet(JURI::root(true) . '/administrator/components/com_rsmembership/assets/css/ui/jquery.ui.all.css'); $doc->addStyleSheet(JURI::root(true) . '/administrator/components/com_rsmembership/assets/css/ui/jquery.ui.timepicker.css'); // Initialize $doc->addScriptDeclaration("jQuery(document).ready(function(\$){\r\n\t\t\t\$('#" . $this->id . "').datetimepicker({\r\n\t\t\t\tchangeMonth: true,\r\n\t\t\t\tchangeYear: true,\r\n\t\t\t\tdateFormat: 'yy-mm-dd',\r\n\t\t\t\ttimeFormat: 'HH:mm:ss'\r\n\t\t\t});\r\n\t\t\r\n\t\t\t\$('#" . $this->id . "_img').click(function(){\r\n\t\t\t\t\$('#" . $this->id . "').datetimepicker('show');\r\n\t\t\t});\r\n\r\n\t\t});"); if ($this->value == $db->getNullDate()) { $this->value = ''; } else { $this->value = JHtml::_('date', $this->value, 'Y-m-d H:i:s'); } $html[] = '<div class="input-append">'; $html[] = parent::getInput(); $html[] = '<span id="' . $this->id . '_img" class="add-on rsme_pointer"><i class="icon-calendar"></i></span>'; $html[] = '</div>'; return implode("\n", $html); }
/** * Method to get the field input markup. * * @return string The field input markup. */ protected function getInput() { $input = parent::getInput(); $params = JComponentHelper::getParams('com_jea'); $surface_measure = $params->get('surface_measure', 'm²'); return $input . ' <span class="input-suffix">' . $surface_measure . '</span>'; }
function getInput() { $config = JComponentHelper::getParams('com_fabrik'); if ($config->get('fbConf_wysiwyg_label', '0') == '0') { return parent::getInput(); } // Initialize some field attributes. $rows = (int) $this->element['rows']; $cols = (int) $this->element['cols']; $height = (string) $this->element['height'] ? (string) $this->element['height'] : '250'; $width = (string) $this->element['width'] ? (string) $this->element['width'] : '100%'; $assetField = $this->element['asset_field'] ? (string) $this->element['asset_field'] : 'asset_id'; $authorField = $this->element['created_by_field'] ? (string) $this->element['created_by_field'] : 'created_by'; $asset = $this->form->getValue($assetField) ? $this->form->getValue($assetField) : (string) $this->element['asset_id']; // Build the buttons array. $buttons = (string) $this->element['buttons']; if ($buttons == 'true' || $buttons == 'yes' || $buttons == '1') { $buttons = true; } elseif ($buttons == 'false' || $buttons == 'no' || $buttons == '0') { $buttons = false; } else { $buttons = explode(',', $buttons); } $hide = (string) $this->element['hide'] ? explode(',', (string) $this->element['hide']) : array(); // Get an editor object. $editor = $this->getEditor(); return $editor->display($this->name, htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8'), $width, $height, $cols, $rows, $buttons ? is_array($buttons) ? array_merge($buttons, $hide) : $hide : false, $this->id, $asset, $this->form->getValue($authorField)); }
/** * Method to get the field input markup for Compositions Nutrients. * * @return string The field input markup. */ protected function getInput() { $html = array(); $thisid = $this->id; $values = $this->value; // Start the Compositions Nutrients field output. $html[] = '<fieldset id="' . $thisid . '" class="nutrients"><span></span>'; // Get the field options. $options = $this->getOptions(); // Build the nutrients field output. foreach ($options as $option) { $this->element['label'] = JText::_($option->text); $this->name = 'jform[' . $this->fieldname . '][' . $option->index . ']'; $this->id = $thisid . '_' . $option->index; $this->value = array_key_exists($option->index, $values) ? $values[$option->index] : ''; $html[] = '<div class="input-prepend span3">'; $html[] = '<span class="add-on">'; $html[] = parent::getLabel(); $html[] = '</span>'; $html[] = parent::getInput(); $html[] = '</div>'; } // End the Compositions Nutrients field output. $html[] = '</fieldset>'; return implode($html); }
/** * Method to get the field input markup. * * @return string The field input markup. * * @since 1.6 */ protected function getInput() { // Get the client id. $clientId = $this->element['client_id']; if (!isset($clientId)) { $clientName = $this->element['client']; if (isset($clientName)) { $client = JApplicationHelper::getClientInfo($clientName, true); $clientId = $client->id; } } if (!isset($clientId) && $this->form instanceof JForm) { $clientId = $this->form->getValue('client_id'); } $clientId = (int) $clientId; // Load the modal behavior script. JHtml::_('behavior.modal', 'a.modal'); // Build the script. $script = array(); $script[] = ' function jSelectPosition_' . $this->id . '(name) {'; $script[] = ' document.id("' . $this->id . '").value = name;'; $script[] = ' SqueezeBox.close();'; $script[] = ' }'; // Add the script to the document head. JFactory::getDocument()->addScriptDeclaration(implode("\n", $script)); // Setup variables for display. $html = array(); $link = 'index.php?option=com_modules&view=positions&layout=modal&tmpl=component&function=jSelectPosition_' . $this->id . '&client_id=' . $clientId; // The current user display field. $html[] = '<div class="input-append">'; $html[] = parent::getInput() . '<a class="btn modal" title="' . JText::_('COM_MODULES_CHANGE_POSITION_TITLE') . '" href="' . $link . '" rel="{handler: \'iframe\', size: {x: 800, y: 450}}">' . '<i class="icon-screenshot"></i> ' . JText::_('COM_MODULES_CHANGE_POSITION_BUTTON') . '</a>'; $html[] = '</div>'; return implode("\n", $html); }
protected function getInput() { $html = array(); $direct = $this->form->getValue('direct_alias', 'params', false); $absent = $this->form->getValue('absent_alias', 'params', false); JFactory::getDocument()->addScriptDeclaration(' function toggleDirectAlias(button) { var direct = document.getElementById("jform_params_direct_alias"); direct.value = 1 - direct.value; button.value = (direct.value > 0) ? "' . JText::_('PLG_SYSTEM_DIRECT_ALIAS_DIRECT') . '" : "' . JText::_('PLG_SYSTEM_DIRECT_ALIAS_RELATIVE') . '"; } function toggleAbsentAlias(button) { var absent = document.getElementById("jform_params_absent_alias"); absent.value = 1 - absent.value; button.value = (absent.value > 0) ? "' . JText::_('PLG_SYSTEM_DIRECT_ALIAS_ABSENT') . '" : "' . JText::_('PLG_SYSTEM_DIRECT_ALIAS_PRESENT') . '"; } '); if (version_compare(JVERSION, '3.2', 'ge')) { $html[] = '<div class="input-append">'; $html[] = parent::getInput(); $html[] = '<input type="button" onclick="toggleDirectAlias(this)" value="' . JText::_($direct ? 'PLG_SYSTEM_DIRECT_ALIAS_DIRECT' : 'PLG_SYSTEM_DIRECT_ALIAS_RELATIVE') . '" class="btn hasTooltip" title="<b>' . JText::_('PLG_SYSTEM_DIRECT_ALIAS_DIRECT_TIP_TITLE') . '</b><br/><br/>' . JText::_('PLG_SYSTEM_DIRECT_ALIAS_DIRECT_TIP_DESC') . '" style="cursor:pointer" data-placement="bottom" />'; $html[] = '<input type="button" onclick="toggleAbsentAlias(this)" value="' . JText::_($absent ? 'PLG_SYSTEM_DIRECT_ALIAS_ABSENT' : 'PLG_SYSTEM_DIRECT_ALIAS_PRESENT') . '" class="btn hasTooltip" title="<b>' . JText::_('PLG_SYSTEM_DIRECT_ALIAS_ABSENT_TIP_TITLE') . '</b><br/><br/>' . JText::_('PLG_SYSTEM_DIRECT_ALIAS_ABSENT_TIP_DESC') . '" style="cursor:pointer" data-placement="bottom" />'; $html[] = '</div>'; } else { $html[] = parent::getInput(); $html[] = '<input type="button" onclick="toggleDirectAlias(this)" value="' . JText::_($direct ? 'PLG_SYSTEM_DIRECT_ALIAS_DIRECT' : 'PLG_SYSTEM_DIRECT_ALIAS_RELATIVE') . '" class="button hasTip" title="' . JText::_('PLG_SYSTEM_DIRECT_ALIAS_DIRECT_TIP_TITLE') . '::' . JText::_('PLG_SYSTEM_DIRECT_ALIAS_DIRECT_TIP_DESC') . '" style="cursor:pointer" />'; $html[] = '<input type="button" onclick="toggleAbsentAlias(this)" value="' . JText::_($absent ? 'PLG_SYSTEM_DIRECT_ALIAS_ABSENT' : 'PLG_SYSTEM_DIRECT_ALIAS_PRESENT') . '" class="button hasTip" title="' . JText::_('PLG_SYSTEM_DIRECT_ALIAS_ABSENT_TIP_TITLE') . '::' . JText::_('PLG_SYSTEM_DIRECT_ALIAS_ABSENT_TIP_DESC') . '" style="cursor:pointer" />'; } return implode("\n", $html); }
/** * Method to get the field input markup. * * @return string The field input markup. * * @since 11.1 */ protected function getInput() { $html = array(); $thisid = $this->id; $values = $this->value; $class = $this->class; $languages = JLanguageHelper::getLanguages(); foreach ($languages as $lang) { $language = new JLanguage($lang->lang_code); $this->class = $class . ($language->isRTL() ? ' rtl' : ' ltr'); $this->element['label'] = $lang->title; $this->name = 'jform[' . $this->fieldname . '][' . $lang->lang_code . ']'; $this->id = $thisid . '_' . $lang->lang_code; $this->value = array_key_exists($lang->lang_code, $values) ? $values[$lang->lang_code] : ''; $html[] = '<div class="control-group">'; $html[] = '<div class="control-label">'; $html[] = parent::getLabel(); $html[] = '</div>'; $html[] = '<div class="controls">'; $html[] = parent::getInput(); $html[] = '</div>'; $html[] = '</div>'; } return implode($html); }
protected function getInput() { if (file_exists(JPATH_ROOT . '/components/com_acymailing/acymailing.php')) { JHtml::_('behavior.modal'); $this->element['class'] .= ($this->element['class'] ? ' ' : '') . 'input-medium'; $link = 'index.php?option=com_acymailing&tmpl=component&ctrl=chooselist&task=' . $this->id . '&values=' . $this->value . '&control='; if (version_compare(JVERSION, '3.0.0') == -1) { $html = '<div class="fltlft">'; $html .= parent::getInput(); $html .= '</div><div class="button2-left"><div class="blank">'; $html .= '<a class="modal hasTip" id="link' . $this->id . '" title="::' . JText::_('MOD_PWEBCONTACT_ACYMAILING_SELECT_LISTS') . '"'; $html .= ' href="' . $link . '" rel="{handler:\'iframe\',size:{x:650,y:375}}">'; $html .= JText::_('MOD_PWEBCONTACT_ACYMAILING_SELECT'); $html .= '</a>'; $html .= '</div></div>'; } else { $html = '<div class="input-append">'; $html .= parent::getInput(); $html .= '<a class="btn modal hasTip" id="link' . $this->id . '" title="::' . JText::_('MOD_PWEBCONTACT_ACYMAILING_SELECT_LISTS') . '"'; $html .= ' href="' . $link . '" rel="{handler:\'iframe\',size:{x:650,y:375}}">'; $html .= '<i class="icon-list-view"></i>'; $html .= '</a>'; $html .= '</div>'; } } else { $html = '<span class="badge badge-warning">' . JText::_('MOD_PWEBCONTACT_ACYMAILING_NOT_INSTALLED') . '</span>'; if (version_compare(JVERSION, '3.0.0') == -1) { $html = '<div class="fltlft">' . $htm . '</div>'; } } return $html; }
protected function getInput() { $size = $this->element['size']; $doc = JFactory::getDocument(); $doc->addScriptDeclaration('if(typeof jQuery!=="undefined") jQuery(document).ready(function($){ $("#pwebcontact_paste_' . $this->id . '").click(function(e){ e.preventDefault(); var s = prompt("' . JText::_('MOD_PWEBCONTACT_ADWORDS_SCRIPT_PASTE') . '"); if(s){ var u = s.match(/<img[^>]* src=["]([^"]+)"/i); if (u && typeof u[1] != "undefined") document.getElementById("' . $this->id . '").value = u[1].replace(new RegExp("&", "gi"), "&"); } }); });'); if (version_compare(JVERSION, '3.0.0') == -1) { $html = '<div class="fltlft">'; $html .= parent::getInput(); $html .= '</div><div class="button2-left"><div class="blank">'; $html .= '<a id="pwebcontact_paste_' . $this->id . '" href="#">'; $html .= JText::_('MOD_PWEBCONTACT_PASTE_BUTTON'); $html .= '</a>'; $html .= '</div></div>'; } else { $html = '<div class="input-append">'; $html .= parent::getInput(); $html .= '<a class="btn" id="pwebcontact_paste_' . $this->id . '" href="#">'; $html .= JText::_('MOD_PWEBCONTACT_PASTE_BUTTON'); $html .= '</a>'; $html .= '</div>'; } return $html; }
/** * Method to get the field input markup. * * @return string The field input markup. * @since 1.6 */ protected function getInput() { $price = $this->form->getValue('price'); $html = ""; if (is_array($price)) { foreach ($price as $wday => $priceOfWeekDay) { $html .= ' <div class="input-prepend prependtop"> <span class="add-on">' . JText::_($wday) . '</span> <input class="align-right input-mini" name="jform[price][' . $wday . ']" value="' . $priceOfWeekDay . '"> </div> '; } $html .= ' <p class="help-block"> Switch back to <a id="sr-switch-simple-tariff" href="">Simple Tariff</a> or use <a id="sr-switch-complexed-tariff" href="">Complex Tariff</a> </p> '; } else { $html .= parent::getInput(); $html .= ' <p class="help-block"> For more flexible tariff, you can try <a id="sr-switch-advanced-tariff" href="">Advanced Tariff</a> or <a id="sr-switch-complexed-tariff" href="">Complex Tariff</a> </p> '; } return $html; }
protected function getInput() { $html = parent::getInput(); $example = (string) $this->element['example']; if (!empty($example)) { $html = str_replace('/>', ' placeholder="' . JText::_($example) . '"/>', $html); } return $html; }
public function getInput() { $domain = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ''; if (preg_match('/(?P<domain>[a-z0-9][a-z0-9\\-]{1,63}\\.[a-z\\.]{2,6})$/i', $domain, $regs)) { $domain = $regs['domain']; } $value = htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8'); $this->value = !empty($value) ? $value : $domain; return parent::getInput(); }
/** * Method to get the field input markup. * * @return string The field input markup. * @since 1.6 */ protected function getInput() { $input = parent::getInput(); if (strpos($input, "placeholder") === false) { $placeholder = $this->element['placeholder'] ? ' placeholder="' . htmlspecialchars(JText::_($this->element['placeholder'])) . '"' : ''; $input = str_replace("/>", " {$placeholder} />", $input); } JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php"); JEVHelper::ConditionalFields($this->element, $this->form->getName()); return $input; }
/** * Method to get the field input markup. * * @return string The field input markup. */ protected function getInput() { $input = parent::getInput(); $params = JComponentHelper::getParams('com_jea'); $symbol_place = $params->get('symbol_place', 1); $currency_symbol = $params->get('currency_symbol', '€'); $currency_symbol = '<span class="input-suffix">' . $currency_symbol . '</span>'; if ($symbol_place == 0) { return $currency_symbol . ' ' . $input; } return $input . ' ' . $currency_symbol; }
/** * Method to get the field input markup. * * @return string The field input markup. * @since 1.6 */ protected function getInput() { $language =& JFactory::getLanguage(); $language->load('mod_roknavmenu',JPATH_SITE); // Get the client id. $clientId = $this->element['client_id']; if (!isset($clientId)) { $clientName = $this->element['client']; if (isset($clientName)) { $client = JApplicationHelper::getClientInfo($clientName, true); $clientId = $client->id; } } if (!isset($clientId) && $this->form instanceof JForm) { $clientId = $this->form->getValue('client_id'); } $clientId = (int) $clientId; // Load the modal behavior script. JHtml::_('behavior.modal', 'a.modal'); // Build the script. $script = array(); $script[] = ' function jSelectPosition_'.$this->id.'(name) {'; $script[] = ' document.id("'.$this->id.'").value = name;'; $script[] = ' SqueezeBox.close();'; $script[] = ' }'; // Add the script to the document head. JFactory::getDocument()->addScriptDeclaration(implode("\n", $script)); // Setup variables for display. $html = array(); $link = 'index.php?option=com_modules&view=positions&layout=modal&tmpl=component&function=jSelectPosition_'.$this->id.'&client_id='.$clientId; // The current user display field. $html[] = '<div class="fltlft">'; $html[] = parent::getInput(); $html[] = '</div>'; // The user select button. $html[] = '<div class="button2-left">'; $html[] = ' <div class="blank">'; $html[] = ' <a class="modal" title="'.JText::_('MOD_ROKNAVMENU_SELECT_MODULE_POSITION').'" href="'.$link.'" rel="{handler: \'iframe\', size: {x: 800, y: 450}}">'.JText::_('MOD_ROKNAVMENU_SELECT_MODULE_POSITION').'</a>'; $html[] = ' </div>'; $html[] = '</div>'; return implode("\n", $html); }
/** * Method to get the field input markup. * * @return string The field input markup. */ protected function getInput() { $id = isset($this->element['id']) ? $this->element['id'] : null; $this->cssId = '#' . $this->getId($id, $this->element['name']); if (isset($this->element['inline']) && $this->element['inline'] == 'true') { $class = $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : ''; $this->fieldHtml = '<div id="' . $this->getId($id, $this->element['name']) . '" ' . $class . '></div>'; } else { $this->fieldHtml = parent::getInput(); } $this->datepickerOptions = $this->getDatepickerOptions(); return RLayoutHelper::render('fields.rdatepicker', $this); }
/** * Method to get the field input markup. * * @return string The field input markup. */ protected function getInput() { if ($this->form->getValue('record_in_database')) { $db = FabrikWorker::getDbo(true); $query = $db->getQuery(true); $id = (int) $this->form->getValue('id'); $query->select('db_table_name')->from('#__{package}_lists')->where('form_id = ' . $id); $db->setQuery($query); $this->element['readonly'] == true; $this->element['class'] = 'readonly'; $this->value = $db->loadResult(); } return parent::getInput(); }
protected function getInput() { $model = JModelLegacy::getInstance('editplugin', 'JCKManModel'); $item = $model->getItem(); if ($item) { if (!$item->title) { $this->element['readonly'] = 'true'; $this->element['disabled'] = 'true'; } //end if } //end if return parent::getInput(); }
/** * Method to get the field input markup. * * @return string The field input markup. * * @since 11.1 */ protected function getInput() { $html = parent::getInput(); $html .= $this->getCounterMask(); // @TODO : Convert this into a snippet that loads only once // using the .charcounter selector $doc = JFactory::getDocument(); $doc->addScriptDeclaration(' jQuery(document).ready(function() { jQuery("#' . $this->id . '").on("keyup", function() { jQuery("#usedchars_' . $this->id . '").text(jQuery("#' . $this->id . '").val().length); jQuery("#remainingchars_' . $this->id . '").text((' . $this->maxlength . ' - jQuery("#' . $this->id . '").val().length)); }); }); '); return $html; }
protected function getInput() { $element = $this->element; if ($this->multiple) { $this->__set('name', $this->fieldname); if (is_array($this->value)) { $this->value = array_shift($this->value); } } if ($element && isset($element['data-provide'])) { $str = '" data-provide="' . (string) $element['data-provide']; $this->id = $this->id . $str; // $this -> __set('id', $this->id.$str); } $html = parent::getInput(); return $html; }
/** * Method to get the field input. * * @return string The field input. * * @since 2.5 */ public function getInput() { $script = <<<ENDSCRIPT \t\tfunction getZip() { \t\t var onRequest = function () { \t\t document.id('reload').setStyle('display', 'block'); \t\t }; \t\t var onComplete = function () { \t\t document.id('reload').setStyle('display', 'none'); \t\t }; \t\t var onSuccess = function (response) { \t\t var responseJSON = JSON.parse(response); \t\t document.id('jform_street').value = responseJSON.tipo_logradouro + ', ' + responseJSON.logradouro; \t\t document.id('jform_district').value = responseJSON.bairro; \t\t document.id('jform_city').value = responseJSON.cidade; \t\t document.id('jform_state').value = responseJSON.uf; \t\t }; \t\t var queryString = { \t\t 'option': 'com_hello', \t\t 'task': 'clients.getzip', \t\t 'zip': document.id('jform_zip_code').value, \t\t 'format': 'raw' \t\t }; \t\t var options = { \t\t url: 'index.php', \t\t method: 'get', \t\t update: null, \t\t data: queryString, \t\t onSuccess: onSuccess, \t\t onComplete: onComplete, \t\t onRequest: onRequest \t\t }; \t\t var ajaxReq = new Request(options).send(); \t\t}; ENDSCRIPT; $doc = JFactory::getDocument(); $doc->addScriptDeclaration($script); $html = parent::getInput(); $html .= '<input type="button" onClick="getZip()" value="' . JText::_('JSEARCH_FILTER_SUBMIT') . '" />'; $html .= '<div id="reload" style="display:none;"><img src="' . JURI::root() . 'media/system/images/mootree_loader.gif" alt="" /></div>'; return $html; }
/** * Method to get the field input markup. * * @return string The field input markup. * * @since 11.1 */ protected function getInput() { $class = $this->element['class'] ? (string) $this->element['class'] : ''; if (strstr($class, 'inter')) { $phone = parent::getInput(); } else { $name = $this->name; $value = explode('-', $this->value); $this->name = $name . '[area]'; $this->value = isset($value[0]) ? $value[0] : ''; $phone = '(' . parent::getInput() . ')'; $this->name = $name . '[detail1]'; $this->value = isset($value[1]) ? $value[1] : ''; $phone .= parent::getInput(); $this->name = $name . '[detail2]'; $this->value = isset($value[2]) ? $value[2] : ''; $phone .= parent::getInput(); } return $phone; }
/** * Method to get the field input markup. * * @return string The field input markup. * @since 1.6 */ protected function getInput() { // Get the client id. $clientId = $this->element['client_id']; if (!isset($clientId)) { $clientName = $this->element['client']; if (isset($clientName)) { $client = JApplicationHelper::getClientInfo($clientName, true); $clientId = $client->id; } } if (!isset($clientId) && $this->form instanceof JForm) { $clientId = $this->form->getValue('client_id'); } $clientId = (int) $clientId; // Load the modal behavior script. Html::behavior('modal', 'a.modal'); // Build the script. $script = array(); $script[] = ' function jSelectPosition_' . $this->id . '(name) {'; $script[] = ' $("#' . $this->id . '").val(name);'; $script[] = ' $.fancybox.close();'; $script[] = ' }'; // Add the script to the document head. Document::addScriptDeclaration(implode("\n", $script)); // Setup variables for display. $html = array(); $link = 'index.php?option=com_modules&view=positions&layout=modal&tmpl=component&function=jSelectPosition_' . $this->id . '&client_id=' . $clientId; // The current user display field. //$html[] = '<div class="fltlft">'; $html[] = '<div class="input-modal">'; $html[] = '<span class="input-cell">'; $html[] = parent::getInput(); $html[] = '</span>'; // The user select button. $html[] = '<span class="input-cell">'; $html[] = '<a class="button modal" title="' . Lang::txt('COM_MODULES_CHANGE_POSITION_TITLE') . '" href="' . $link . '" rel="{handler: \'iframe\', size: {x: 800, y: 450}}">' . Lang::txt('COM_MODULES_CHANGE_POSITION_BUTTON') . '</a>'; $html[] = '</span>'; $html[] = '</div>'; return implode("\n", $html); }
/** * Method to get the field input markup. * * @return string The field input markup. * * @since 11.1 */ protected function getInput() { // Initialize some field attributes. $this->element['class'] = $this->element['class'] ? $this->element['class'] . ' jcalendar' : 'jcalendar'; // Initialize javascript $script = 'jQuery(document).ready(function(){'; $script .= 'jQuery(".jcalendar").datepicker({'; $script .= 'maxDate: "today",'; $script .= 'dateFormat: "yy-mm-dd",'; $script .= 'yearRange: "c-50:c+50",'; $script .= 'changeMonth: true,'; if ($this->element['image']) { $script .= 'showOn: "both",'; $script .= 'buttonImageOnly: true,'; $script .= 'buttonImage: "' . JURI::root() . $this->element['image'] . '",'; $script .= 'buttonText: "Calendar",'; } $script .= 'changeYear: true'; $script .= '});'; $script .= '});'; JFactory::getDocument()->addScriptDeclaration($script); return parent::getInput(); }
protected function getInput() { $button = JHtml::_('link', $this->getAttribute('info_url'), JText::_($this->getAttribute('info_label')), array(' target' => '_blank', 'class' => 'btn btn-info', 'title' => JText::_($this->getAttribute('info_title')))); return parent::getInput() . ' ' . $button; }
protected function getInput() { $classes = array('inputbox'); $this->class = $this->class . ' ' . implode(' ', $classes); return parent::getInput(); }
/** * Method to get the field input markup. * * @return string The field input markup. * * @since 1.6 */ protected function getInput() { // Load the modal behavior script. JHtml::_('behavior.modal', 'a.modal'); // Build the script. $script = array(); $script[] = ' function jSelectPosition_' . $this->id . '(name) {'; $script[] = ' document.getElementById("' . $this->id . '").value = name;'; $script[] = ' jModalClose();'; $script[] = ' }'; // Add the script to the document head. JFactory::getDocument()->addScriptDeclaration(implode("\n", $script)); // Setup variables for display. $html = array(); $link = 'index.php?option=com_modules&view=positions&layout=modal&tmpl=component&function=jSelectPosition_' . $this->id . '&client_id=' . $this->clientId; // The current user display field. $html[] = '<div class="input-append">'; $html[] = parent::getInput() . '<a class="btn modal" title="' . JText::_('COM_MODULES_CHANGE_POSITION_TITLE') . '" href="' . $link . '" rel="{handler: \'iframe\', size: {x: 800, y: 450}}">' . JText::_('COM_MODULES_CHANGE_POSITION_BUTTON') . '</a>'; $html[] = '</div>'; return implode("\n", $html); }
public function getInput() { JFactory::getDocument()->addScript(JURI::base() . 'components/com_ganalytics/libraries/jscolor/jscolor.js'); return parent::getInput(); }
public function getInput() { $document = JFactory::getDocument(); $document->addScript(JURI::root() . 'plugins/content/mosimage/mosimage/js/mosimage.js'); return parent::getInput(); }