protected function getInput() { $attr = ''; $attr .= $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : ''; $attr .= (string) $this->element['disabled'] == 'true' ? ' disabled="disabled"' : ''; $attr .= $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : ''; $attr .= $this->element['multiple'] == 'true' ? ' multiple="multiple"' : ''; $default_name = $this->element['default_name'] ? '- ' . JText::_($this->element['default_name']) . ' -' : null; $optionss = array(); $optionss = DJClassifiedsCategory::getCatSelect(); //$main_tab = array(); //$main_tab[0]= JHTML::_('select.option', '0', JText::_('MOD_DJCLASSIFIEDS_ITEMS_ALL_CATEGORIES')); //$options = array(); //$options = array_merge_recursive ($main_tab, $optionss); $html = JHTML::_('select.genericlist', $optionss, $this->name, trim($attr), 'value', 'text', $this->value); return $html; }
protected function getInput() { $language = JFactory::getLanguage(); $c_lang = $language->getTag(); if ($c_lang == 'pl-PL' || $c_lang == 'en-GB') { $language->load('com_djclassifieds', JPATH_SITE . '/components/com_djclassifieds', null, true); } else { $language->load('com_djclassifieds', JPATH_SITE, null, true); } $attr = ''; $attr .= $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : ''; $attr .= (string) $this->element['disabled'] == 'true' ? ' disabled="disabled"' : ''; $attr .= $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : ''; $attr .= $this->element['multiple'] == 'true' ? ' multiple="multiple"' : ''; $default_name = $this->element['default_name'] ? '- ' . JText::_($this->element['default_name']) . ' -' : null; $optionss = array(); $optionss = DJClassifiedsCategory::getCatSelect(); $main_tab = array(); $main_tab[0] = JHTML::_('select.option', '0', JText::_('COM_DJCLASSIFIEDS_ALL_CATEGORIES')); $options = array(); $options = array_merge_recursive($main_tab, $optionss); $html = JHTML::_('select.genericlist', $options, $this->name, trim($attr), 'value', 'text', $this->value); return $html; }
<select name="filter_category" class="inputbox" onchange="this.form.submit()"> <option value=""><?php echo JText::_('JOPTION_SELECT_CATEGORY'); ?> </option> <option <?php if ($this->state->get('filter.category') == -1) { echo 'SELECTED'; } ?> value="-1"><?php echo JText::_('COM_DJCLASSIFIEDS_MAIN_CATEGORY'); ?> </option> <?php $optionss = DJClassifiedsCategory::getCatSelect(); ?> <?php echo JHtml::_('select.options', $optionss, 'value', 'text', $this->state->get('filter.category')); ?> </select> </div> </fieldset> <div class="clr"> </div> <table class="adminlist"> <thead> <tr> <th width="5%"> <input type="checkbox" name="checkall-toggle" value="" onclick="checkAll(this)" /> </th>
<div class="tab-pane" id="category_custom_fields"> <div class="control-group"> <div class="control-group"> <div class="control-label"><?php echo JText::_('COM_DJCLASSIFIEDS_CATEGORY'); ?> </div> <div class="controls"> <select autocomplete="off" name="cat_id" class="inputbox" onchange="getFields(this.value)" > <option value=""><?php echo JText::_('JOPTION_SELECT_CATEGORY'); ?> </option> <?php echo JHtml::_('select.options', DJClassifiedsCategory::getCatSelect(), 'value', 'text', $this->item->cat_id, true); ?> </select> </div> </div> <div class="control-group"> <div class="control-label"><?php echo JText::_('COM_DJCLASSIFIEDS_EXTRA_FIELDS'); ?> </div> <div class="controls"> <div id="ex_fields"><?php echo JText::_('COM_DJCLASSIFIEDS_PLEASE_SELECT_CATEGORY'); ?> </div> </div>