本文整理汇总了PHP中JFormFieldText::getInput方法的典型用法代码示例。如果您正苦于以下问题:PHP JFormFieldText::getInput方法的具体用法?PHP JFormFieldText::getInput怎么用?PHP JFormFieldText::getInput使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JFormFieldText
的用法示例。
在下文中一共展示了JFormFieldText::getInput方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getInput
protected function getInput()
{
//ConditionalHelperAsset::load('conditional.js');
$this->class = !empty($this->class) ? $this->class . ' hp_conditional' : 'hp_conditional';
return parent::getInput();
$conditionalOn = $this->conditionalOn;
}
示例2: getInput
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);
}
示例3: getInput
/**
* 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>';
}
示例4: getInput
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));
}
示例5: getInput
/**
* 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);
}
示例6: getInput
/**
* 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);
}
示例7: getInput
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);
}
示例8: getInput
/**
* 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);
}
示例9: getInput
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;
}
示例10: getInput
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;
}
示例11: getInput
/**
* 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;
}
示例12: getInput
protected function getInput()
{
$html = parent::getInput();
$example = (string) $this->element['example'];
if (!empty($example)) {
$html = str_replace('/>', ' placeholder="' . JText::_($example) . '"/>', $html);
}
return $html;
}
示例13: getInput
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();
}
示例14: 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;
}
示例15: getInput
/**
* 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;
}