/**
	 * Test...
	 *
	 * @return void
	 */
	public function getInput()
	{
		parent::getInput();
	}
Exemple #2
0
 public function getInput()
 {
     JLoader::register('JEVHelper', JPATH_SITE . "/components/com_jevents/libraries/helper.php");
     JEVHelper::ConditionalFields($this->element, $this->form->getName());
     parent::getInput();
 }
Exemple #3
0
 /**
  * Method to get the field input markup.
  *
  * @return  string  The field input markup.
  *
  * @since   11.1
  */
 protected function getInput()
 {
     JHtml::_('jquery.framework');
     $script = "jQuery(document).ready(function()\n{\n\tjQuery('#" . $this->id . "_fieldset select').change(function()\n\t{\n\t\tselector = '#" . $this->id . "';\n\t\tbirthday = jQuery(selector+'_0').val() + '-' + jQuery(selector+'_1').val() + '-' + jQuery(selector+'_2').val();\n\t\tjQuery(selector).val(birthday);\n\t})\n})\n";
     $document = JFactory::getDocument();
     $document->addScriptDeclaration($script);
     $class = $this->class;
     $this->class = '';
     // Orginal hidden Calendar Field
     $calendar = '<span style="display:none">' . parent::getInput() . '</span>';
     // Birthday Field with 3 input
     $birthday = $this->value ? explode('-', JHtml::_('date', $this->value, 'Y-m-d')) : array('', '', '');
     $thisid = $this->id;
     $labelclass = $this->labelclass;
     $this->labelclass = 'hide';
     // Year
     $this->class = $class;
     $this->title = JText::_('COM_SIBDIET_YEAR');
     $this->name = $this->fieldname . '_0';
     $this->id = $thisid . '_0';
     $this->value = (int) $birthday[0];
     $this->element['step'] = -1;
     $this->element['first'] = JHTML::_('date', JFactory::getDate(), 'Y');
     $this->element['last'] = $this->element['first'] - 100;
     $yearLabel = parent::getLabel();
     $yearField = $this->getBirthdayInput();
     $this->element['first'] = 1;
     $this->element['step'] = 1;
     // Month
     $this->title = JText::_('COM_SIBDIET_MONTH');
     $this->name = $this->fieldname . '_1';
     $this->id = $thisid . '_1';
     $this->value = (int) $birthday[1];
     $this->element['last'] = 12;
     $monthLabel = parent::getLabel();
     $monthField = $this->getBirthdayInput();
     // Day
     $this->title = JText::_('COM_SIBDIET_DAY');
     $this->name = $this->fieldname . '_2';
     $this->id = $thisid . '_2';
     $this->value = (int) $birthday[2];
     $this->element['last'] = 31;
     $dayLabel = parent::getLabel();
     $dayField = $this->getBirthdayInput();
     $html = array();
     $html[] = '<span id="' . $thisid . '_fieldset">';
     if (JFactory::getLanguage()->isRTL()) {
         $html = array_merge($html, array($dayLabel, $dayField, $monthLabel, $monthField, $yearLabel, $yearField, $calendar));
     } else {
         $html = array_merge($html, array($yearLabel, $yearField, $monthLabel, $monthField, $dayField, $dayLabel, $calendar));
     }
     $html[] = '</span>';
     /*$html[] = '<a href="#convertDateModal" title="' . JText::_('COM_SIBDIET_DATE_CONVERTER') . '" role="button" class="btn hasTooltip" data-toggle="modal"><i class="icon-calendar"></i></a>';
     		
     		$html[] = '<div id="convertDateModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="convertDateModalLabel" aria-hidden="true">
     	<div class="modal-header">
     		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
     		<h3 id="convertDateModalLabel">' . JText::_('COM_SIBDIET_DATE_CONVERTER') . '</h3>
     	</div>
     	<div class="modal-body text-center">
     		<script type="text/javascript" src="http://1abzar.ir/abzar/tools/convert-date/?color=333333&bg=F4EFE8&kc=EDAB55&kadr=1"></script>
     	</div>
     </div>';*/
     $this->labelclass = $labelclass;
     return implode($html);
 }
 public function getInput()
 {
     echo 'here';
     parent::getInput();
 }