コード例 #1
0
	/**
	 * Test the getInput method.
	 *
	 * @return void
	 */
	public function testGetInput()
	{
		$form = new JFormInspector('form1');

		$this->assertThat(
			$form->load('<form><field name="text" type="text" /></form>'),
			$this->isTrue(),
			'Line:' . __LINE__ . ' XML string should load successfully.'
		);

		$field = new JFormFieldText($form);

		$this->assertThat(
			$field->setup($form->getXml()->field, 'value'),
			$this->isTrue(),
			'Line:' . __LINE__ . ' The setup method should return true.'
		);

		$this->assertThat(
			strlen($field->input),
			$this->greaterThan(0),
			'Line:' . __LINE__ . ' The getInput method should return something without error.'
		);

		// TODO: Should check all the attributes have come in properly.
	}
コード例 #2
0
 /**
  * Tests maxLength attribute setup by JFormFieldText::setup method
  *
  * @covers JFormField::setup
  * @covers JFormField::__get
  *
  * @return void
  */
 public function testSetupMaxlength()
 {
     $field = new JFormFieldText();
     $element = simplexml_load_string('<field name="myName" type="text" maxlength="60" />');
     $this->assertThat($field->setup($element, ''), $this->isTrue(), 'Line:' . __LINE__ . ' The setup method should return true if successful.');
     $this->assertThat($field->maxLength, $this->equalTo(60), 'Line:' . __LINE__ . ' The property should be computed from the XML.');
 }
コード例 #3
0
ファイル: multilang.php プロジェクト: smhnaji/sdnet
 /**
  * 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);
 }
コード例 #4
0
 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&amp;tmpl=component&amp;ctrl=chooselist&amp;task=' . $this->id . '&amp;values=' . $this->value . '&amp;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;
 }
コード例 #5
0
 /**
  * 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
0
 /**
  * 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 . '&amp;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
0
    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
0
ファイル: textorwysiwyg.php プロジェクト: romuland/khparts
 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));
 }
コード例 #9
0
ファイル: pwebadwords.php プロジェクト: smart-one/3kita
    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("&amp;", "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;
    }
コード例 #10
0
ファイル: price.php プロジェクト: prox91/joomla-dev
    /**
     * 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;
    }
コード例 #11
0
ファイル: jevfilters.php プロジェクト: pguilford/vcomcc
 function __construct($form = null)
 {
     // Must load admin language files
     $lang = JFactory::getLanguage();
     $lang->load("com_jevents", JPATH_ADMINISTRATOR);
     parent::__construct($form);
 }
コード例 #12
0
ファイル: date.php プロジェクト: JozefAB/qk
 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);
 }
コード例 #13
0
ファイル: text.php プロジェクト: carcam/lib_fields
 protected function getInput()
 {
     //ConditionalHelperAsset::load('conditional.js');
     $this->class = !empty($this->class) ? $this->class . ' hp_conditional' : 'hp_conditional';
     return parent::getInput();
     $conditionalOn = $this->conditionalOn;
 }
コード例 #14
0
ファイル: surface.php プロジェクト: Cloudum/com_jea
 /**
  * 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>';
 }
コード例 #15
0
ファイル: text.php プロジェクト: lyrasoft/lyrasoft.github.io
 public function setup(SimpleXMLElement $element, $value, $group = null)
 {
     $this->element = $element;
     $element['label'] = $this->prepareText($element['label']);
     $element['description'] = $this->prepareText($element['description']);
     $element['translateDescription'] = false;
     return parent::setup($element, $value, $group);
 }
コード例 #16
0
ファイル: djtext.php プロジェクト: chaudhary4k4/modernstore
 protected function getInput()
 {
     $html = parent::getInput();
     $example = (string) $this->element['example'];
     if (!empty($example)) {
         $html = str_replace('/>', ' placeholder="' . JText::_($example) . '"/>', $html);
     }
     return $html;
 }
コード例 #17
0
ファイル: color.php プロジェクト: ankaau/GathBandhan
 public function setup(&$element, $value, $group = null)
 {
     $return = parent::setup($element, $value, $group);
     $this->element['class'] = $this->element['class'] . ' color';
     if ($this->element['name'] != 'title_color' and $this->element['name'] != 'date_color') {
         $this->element['onchange'] = 'document.getElementById(\'jform_params_calendar_style\').value=\'custom\'';
     }
     return $return;
 }
コード例 #18
0
ファイル: shlibpluginlink.php プロジェクト: alesconti/FF_2015
 /**
  * Method to get certain otherwise inaccessible properties from the form field object.
  *
  * @param   string  $name  The property name for which to the the value.
  *
  * @return  mixed  The property value or null.
  *
  */
 public function __get($name)
 {
     switch ($name) {
         case 'element':
             return $this->{$name};
             break;
     }
     $value = parent::__get($name);
     return $value;
 }
コード例 #19
0
ファイル: domain.php プロジェクト: jmangarret/webtuagencia24
 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();
 }
コード例 #20
0
ファイル: jeveventtext.php プロジェクト: madcsaba/li-de
 /**
  * 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;
 }
コード例 #21
0
ファイル: url.php プロジェクト: eshiol/joomla-cms
 /**
  * Method to get the data to be passed to the layout for rendering.
  *
  * @return  array
  *
  * @since 3.7
  */
 protected function getLayoutData()
 {
     $data = parent::getLayoutData();
     // Initialize some field attributes.
     $maxLength = !empty($this->maxLength) ? ' maxlength="' . $this->maxLength . '"' : '';
     // Note that the input type "url" is suitable only for external URLs, so if internal URLs are allowed
     // we have to use the input type "text" instead.
     $inputType = $this->element['relative'] ? 'type="text"' : 'type="url"';
     $extraData = array('maxLength' => $maxLength, 'inputType' => $inputType);
     return array_merge($data, $extraData);
 }
コード例 #22
0
ファイル: price.php プロジェクト: Cloudum/com_jea
 /**
  * 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;
 }
コード例 #23
0
	/**
	 * 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&amp;view=positions&amp;layout=modal&amp;tmpl=component&amp;function=jSelectPosition_'.$this->id.'&amp;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);
	}
コード例 #24
0
ファイル: rdatepicker.php プロジェクト: grlf/eyedock
 /**
  * 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);
 }
コード例 #25
0
ファイル: cities.php プロジェクト: smhnaji/sdnet
 /**
  * Method to get the field suggestions.
  *
  * @return  array  The field option objects.
  *
  * @since   11.1
  */
 protected function getSuggestions()
 {
     $options = array();
     $db = JFactory::getDbo();
     $query = $db->getQuery(true)->select('city AS value, city AS `text`, country AS class')->from('#__sibdiet_profiles')->group('city')->order('class, value');
     $db->setQuery($query);
     try {
         $options = $db->loadObjectList();
     } catch (RuntimeException $e) {
         JError::raiseWarning(500, $e->getMessage());
     }
     return array_merge(parent::getSuggestions(), $options);
 }
コード例 #26
0
ファイル: formdatabasename.php プロジェクト: LGBGit/tierno
 /**
  * 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();
 }
コード例 #27
0
ファイル: name.php プロジェクト: smhnaji/sdnet
 /**
  * Method to get the field suggestions.
  *
  * @return  array  The field option objects.
  *
  * @since   11.1
  */
 protected function getSuggestions()
 {
     $options = array();
     $db = JFactory::getDbo();
     $query = $db->getQuery(true)->select('name AS value, name AS text')->from('#__testyourself_questions AS a')->order('a.name')->group('name');
     // Get the options.
     $db->setQuery($query);
     try {
         $options = $db->loadObjectList();
     } catch (RuntimeException $e) {
         JError::raiseWarning(500, $e->getMessage());
     }
     return array_merge(parent::getSuggestions(), $options);
 }
コード例 #28
0
ファイル: plugintitle.php プロジェクト: enjoy2000/714water
 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();
 }
コード例 #29
0
ファイル: cbtext.php プロジェクト: pabloarias/JoomGallery
 /**
  * Method to get the field label markup
  *
  * @return  string  The field label markup
  * @since   2.0
  */
 protected function getLabel()
 {
     $label = '';
     $cbname = $this->element['cbname'] ? $this->element['cbname'] : 'change[]';
     $cbvalue = $this->element['cbvalue'] ? $this->element['cbvalue'] : $this->name;
     $cbrequired = $this->element['cbrequired'] ? (string) $this->element['cbrequired'] : 'false';
     $cbid = str_replace(array('[', ']'), array('', ''), $cbname . $cbvalue);
     $cbonclick = '';
     if ($cbrequired == 'true' || $cbrequired == 'required' || $cbrequired == '1') {
         $cbonclick = "javascript: var el = jQuery('#" . $this->id . "'); if(jQuery('#" . $cbid . "').prop('checked')) { el.attr('aria-required', 'true').attr('required', 'required');} else {el.removeAttr('aria-required').removeAttr('required');}";
     }
     $cbhtml = '<input id="' . $cbid . '" type="checkbox" onclick="' . $cbonclick . '" name="' . $cbname . '" value="' . $cbvalue . '" />';
     $label = $cbhtml . parent::getLabel();
     return $label;
 }
コード例 #30
0
ファイル: tztext.php プロジェクト: templaza/tz_portfolio_plus
 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;
 }