Example #1
0
 /**
  * Method to get the field input markup for check boxes.
  *
  * @return  string  The field input markup.
  *
  * @since   11.1
  */
 protected function getInput()
 {
     $html = array();
     // Get default id
     $this->defaults_id = $this->form->getValue('defaults_id') ? $this->form->getValue('defaults_id') : 0;
     // Set days
     $days = $this->element['days'] ? $this->element['days'] : '1-2-3-4-5-6-7';
     $days = $this->form->getValue('days') ? $this->form->getValue('days') : $days;
     $days = explode('-', $days);
     // Set meals
     $meals = $this->element['meals'] ? $this->element['meals'] : '1,2,3';
     $meals = $this->form->getValue('meal') ? $this->form->getValue('meal') : $meals;
     $meals = explode(',', $meals);
     // Temp value
     $value_array = $this->value;
     foreach ($meals as $meal) {
         $this->meal = $meal;
         $options = (array) $this->getOptions();
         $html[] = '<div class="span4">';
         $html[] = '<div class="control-group center">' . SibdietHelper::convertMeals($meal) . '</div>';
         foreach ($days as $day) {
             $this->value = isset($value_array[$meal][$day]) ? $value_array[$meal][$day] : '';
             $this->name = 'jform[' . $this->fieldname . '][' . $meal . '][' . $day . ']';
             $this->id = $this->id . 'meal' . $meal . 'day' . $day;
             $this->hint = SibdietHelper::dayToString($day);
             $html[] = '<div class="control-group center">';
             $html[] = parent::getInput();
             $html[] = '</div>';
         }
         $html[] = '</div>';
     }
     return implode($html);
 }
Example #2
0
            ?>
								<?php 
            echo $this->escape($item->title);
            ?>
							<?php 
        }
        ?>
							<div class="small">
								<?php 
        echo JText::_('COM_SIBDIET_DIET') . ': ' . $this->escape($item->diets_title);
        ?>
							</div>
						</td>
						<td class="hidden-phone">
							<?php 
        echo SibdietHelper::convertMeals($item->meal);
        ?>
						</td>
						<td class="hidden-phone">
							<?php 
        echo SibdietHelper::convertSeasons($item->season);
        ?>
						</td>
						<td class="small nowrap hidden-phone">
							<?php 
        if ($item->language == '*') {
            ?>
								<?php 
            echo JText::alt('JALL', 'language');
            ?>
							<?php