private static function generateDropDown($id, $attributes_input, $model, $attributes) { $blankTitle = null; $valueField = "id"; $textField = null; if (!isset($attributes["dropDownOptions"])) { throw new Exception("DropDownOption is required if you want to create a dropDown input", 1); } $dropDownOptions = $attributes["dropDownOptions"]; if (isset($dropDownOptions["blankLabel"])) { $blankTitle = $dropDownOptions["blankLabel"]; } if (array_key_exists("options", $dropDownOptions) && is_array($dropDownOptions["options"])) { $listOptions = array(); if (isset($blankTitle)) { $listOptions[""] = $blankTitle; } $listOptions = array_merge($listOptions, $dropDownOptions["options"]); } elseif (array_key_exists("optionsFromMethod", $dropDownOptions) && is_array($dropDownOptions["optionsFromMethod"])) { $optionCustom = $dropDownOptions["optionsFromMethod"]; $className = $optionCustom[0]; $functionName = $optionCustom[1]; $definitionClassname = "Admin\\{$className}"; $modelDropDown = new $definitionClassname(); $listOptions = $modelDropDown->{$functionName}(); } else { static::validateDataForDropDown($attributes); if (isset($dropDownOptions["valueField"]) && !empty($dropDownOptions["valueField"])) { $valueField = $dropDownOptions["valueField"]; } $textField = $dropDownOptions["titleField"]; $dropDownClassName = $dropDownOptions["class"]; $definitionClassname = "Admin\\{$dropDownClassName}"; $modelDropDown = new $definitionClassname(); if (isset($dropDownOptions["filters"])) { $modelDropDown = $modelDropDown->addFilters($dropDownOptions["filters"]); } $listOptions = SelectHelper::generateOptions($modelDropDown->get(), $textField, $valueField, $blankTitle); } return Form::select($attributes_input["name"], $listOptions, $model->{$id}); }
<?php echo JHTML::_('hotelguide.list.AjaxCountry', 'COUNTRY', $this->row->country, NULL); ?> </td> </tr> <tr> <td class="key"><?php echo JHTML::_('hotelguide.form.label', 'SELECT STATE', 'statename'); ?> </td> <td colspan='2' align='left'> <div id="AjaxState" style="float:left"> <?php $row->id = 0; $row->statename = $this->row->statename; echo SelectHelper::SelectAjaxState($row, $this->row->country); ?> </div> <div id="progressL"></div> </td> <tr> <td class="key"> <label for="name"> <?php echo JText::_('CITY NAME') . ':'; ?> </label> </td> <td> <input id="name" name="name" class="required" value="<?php echo $this->row->name;
<script type="text/javascript" charset="utf-8"> jQuery("#slider3").slider({ from: 10, to: 1000, step: 10, smooth: true, round: 0, dimension: " USD", skin: "plastic" }); </script> <?php echo '</div>' . "\n"; echo '</div>' . "\n"; echo '<div class="left_box">' . "\n"; echo '<p style="text-align:left;">' . "\n"; echo JText::_('HG_FACILITIES') . ': '; echo '</p>' . "\n"; echo SelectHelper::search_facility($this->filter_facility); echo '</div>' . "\n"; echo '<div class="right_box">' . "\n"; echo '<p style="text-align:left;">' . "\n"; echo JText::_('HG_THEME_TYPES') . ': '; echo '</p>' . "\n"; echo SelectHelper::search_type($this->filter_type); echo '</div>' . "\n"; echo '</div>' . "\n"; echo '</div>' . "\n"; echo '</div>' . "\n"; } ?> </form> <?php if ($this->hgconf->box == 'None') { echo '<div style="clear:both;padding-bottom:10px;"></div>' . "\n"; } else { echo hg_html::boxbottom(); }
</td> </tr> </table> <input type="hidden" name="roomfacilities"> <table cellpadding="4" cellspacing="1" border="0" width="100%" class="adminform"> <tr> <td><strong> <?php echo JText::_('PLEASE_SELECT_ROOM_FACILITIES'); ?> </strong></td> </tr> <tr> <td> <?php echo SelectHelper::SelectRoomFacilities($this->row); ?> </td> </tr> </table> <?php echo $this->tabs->endPanel(); echo $this->tabs->startPanel(JText::_('ROOM RATES'), 'panel2'); ?> <table class="admintable"> <tr> <td class="key"><?php echo JHTML::_('hotelguide.form.label', 'CURRENCY', 'currency', false); ?>