Example #1
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = SolidresHelper::getActions();
     JToolBarHelper::title(JText::_('SR_MANAGE_RESERVATION'), 'generic.png');
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('reservation.edit', 'JTOOLBAR_EDIT');
     }
     if ($canDo->get('core.edit.state')) {
         if ($state->get('filter.state') != 2) {
             JToolBarHelper::divider();
             JToolBarHelper::custom('reservations.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true);
             JToolBarHelper::custom('reservations.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
         }
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'reservations.delete', 'JTOOLBAR_EMPTY_TRASH');
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::trash('reservations.trash', 'JTOOLBAR_TRASH');
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::divider();
         JToolBarHelper::preferences('com_solidres');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('screen.reservation', 'JTOOLBAR_HELP');
 }
Example #2
0
 function display($tpl = null)
 {
     $this->context = 'com_solidres.reservation.process';
     $this->config = JComponentHelper::getParams('com_solidres');
     $this->showPoweredByLink = $this->config->get('show_solidres_copyright', '1');
     if ($this->_layout == 'default') {
         $model = $this->getModel();
         $modelName = $model->getName();
         $this->reservation = $model->getItem();
         $this->app = JFactory::getApplication();
         $this->checkin = $model->getState($modelName . '.checkin');
         $this->checkout = $model->getState($modelName . '.checkout');
         $this->totalReservedRoom = $model->getState($modelName . '.totalReservedRoom');
         $this->countries = SolidresHelper::getCountryOptions();
         $this->geoStates = SolidresHelper::getGeoStateOptions($model->getState($modelName . '.countryId'));
         $this->userState = $this->app->getUserState($this->context);
         $this->raid = $model->getState($modelName . '.reservationAssetId');
         $this->uri = JURI::getInstance()->__toString();
         $this->roomTypeObj = SRFactory::get('solidres.roomtype.roomtype');
         $this->numberOfNights = $this->roomTypeObj->calculateDateDiff($this->checkin, $this->checkout);
         JHtml::_('jquery.framework');
     }
     JHtml::stylesheet('com_solidres/assets/main.css', false, true, false);
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     parent::display($tpl);
 }
Example #3
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     include JPATH_COMPONENT . '/helpers/toolbar.php';
     $isNew = $this->item->id == 0;
     $canDo = SolidresHelper::getActions('', $this->item->id);
     if ($isNew) {
         JToolBarHelper::title(JText::_('SR_ADD_NEW_EXTRA'), 'generic.png');
     } else {
         JToolBarHelper::title(JText::sprintf('SR_EDIT_EXTRA', $this->item->name), 'generic.png');
     }
     JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
     JHtml::_('behavior.tooltip');
     //JHtml::_('behavior.formvalidation');
     SRHtml::_('jquery.validate');
     //echo SolidresHelperSideNavigation::getSideNavigation($this->getName());
     // If not checked out, can save the item.
     if ($canDo->get('core.edit')) {
         JToolBarHelper::apply('extra.apply', 'JToolbar_Apply');
         JToolBarHelper::save('extra.save', 'JToolbar_Save');
         JToolBarHelper::addNew('extra.save2new', 'JToolbar_Save_and_new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::custom('extra.save2copy', 'copy.png', 'copy_f2.png', 'JToolbar_Save_as_Copy', false);
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('extra.cancel', 'JToolbar_Cancel');
     } else {
         JToolBarHelper::cancel('extra.cancel', 'JToolbar_Close');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('screen.extra.edit', 'JTOOLBAR_HELP');
 }
Example #4
0
 protected function addToolbar()
 {
     JRequest::setVar('hidemainmenu', true);
     include JPATH_COMPONENT . '/helpers/toolbar.php';
     $user = JFactory::getUser();
     $isNew = $this->item->id == 0;
     $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id'));
     $canDo = SolidresHelper::getActions('', $this->item->id);
     if ($isNew) {
         JToolBarHelper::title(JText::_('SR_ADD_NEW_ROOM_TYPE'), 'generic.png');
     } else {
         JToolBarHelper::title(JText::sprintf('SR_EDIT_ROOM_TYPE', $this->item->name), 'generic.png');
     }
     JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
     JHtml::_('behavior.tooltip');
     SRHtml::_('jquery.validate');
     // If not checked out, can save the item.
     if (!$checkedOut && $canDo->get('core.edit')) {
         JToolBarHelper::apply('roomtype.apply', 'JToolbar_Apply');
         JToolBarHelper::save('roomtype.save', 'JToolbar_Save');
         JToolBarHelper::addNew('roomtype.save2new', 'JToolbar_Save_and_new');
     }
     // If an existing item, can save to a copy.
     if (!$isNew && $canDo->get('core.create')) {
         JToolBarHelper::custom('roomtype.save2copy', 'copy.png', 'copy_f2.png', 'JToolbar_Save_as_Copy', false);
     }
     if (empty($this->item->id)) {
         JToolBarHelper::cancel('roomtype.cancel', 'JToolbar_Cancel');
     } else {
         JToolBarHelper::cancel('roomtype.cancel', 'JToolbar_Close');
     }
     SRToolBarHelper::mediaManager();
     JToolBarHelper::divider();
     JToolBarHelper::help('screen.roomtype.edit', 'JTOOLBAR_HELP');
 }
Example #5
0
 /**
  * Method to get the field input markup.
  *
  * @return	string	The field input markup.
  * @since	1.6
  */
 protected function getInput()
 {
     $html = array();
     $selectedId = (int) $this->form->getValue('country_id');
     $options = SolidresHelper::getCountryOptions();
     $html[] = JHtml::_('select.genericlist', $options, $this->name, 'class="country_select"', 'value', 'text', $selectedId);
     return implode($html);
 }
Example #6
0
 /**
  * Method to get the field input markup.
  *
  * @return	string	The field input markup.
  * @since	1.6
  */
 protected function getInput()
 {
     $html = array();
     $selectedId = (int) $this->form->getValue('tax_id');
     $options = SolidresHelper::getTaxOptions($selectedId);
     $html[] = JHtml::_('select.genericlist', $options, $this->name, null, 'value', 'text', $selectedId);
     return implode('', $html);
 }
Example #7
0
 /**
  * Method to get the field input markup.
  *
  * @return	string	The field input markup.
  * @since	1.6
  */
 protected function getInput()
 {
     // Initialize variables.
     $html = array();
     $options = array();
     $selectedId = (int) $this->form->getValue('country_id');
     $options = SolidresHelper::getCountryOptions();
     $html[] = JHtml::_('select.genericlist', $options, $this->name, null, 'value', 'text', $selectedId);
     return implode($html);
 }
Example #8
0
 public function find()
 {
     $countryId = JFactory::getApplication()->input->get('id', 0, 'int');
     $states = SolidresHelper::getGeoStateOptions($countryId);
     $html = '';
     foreach ($states as $state) {
         $html .= '<option value="' . $state->value . '">' . $state->text . '</option>';
     }
     echo $html;
     die(1);
 }
Example #9
0
 /**
  * Method to get the field input markup.
  *
  * @return	string	The field input markup.
  * @since	1.6
  */
 protected function getInput()
 {
     // Initialize variables.
     $html = array();
     $options = array();
     $selectedId = (int) $this->form->getValue('reservation_asset_id');
     $options = SolidresHelper::getReservationAssetOptions();
     $selectAttributes = array('class' => 'required', 'required' => 'required');
     $html[] = JHtml::_('select.genericlist', $options, $this->name, $selectAttributes, 'value', 'text', $selectedId);
     return implode($html);
 }
Example #10
0
 /**
  * Checks whether a user can see this view.
  *
  * @param	string	$view	The view name.
  *
  * @return	boolean
  */
 protected function canView($view)
 {
     $canDo = SolidresHelper::getActions();
     switch ($view) {
         // Special permissions.
         case 'groups':
         case 'group':
         case 'levels':
         case 'level':
             return $canDo->get('core.admin');
             break;
             // Default permissions.
         // Default permissions.
         default:
             return true;
     }
 }
Example #11
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = SolidresHelper::getActions();
     JToolBarHelper::title(JText::_('SR_MANAGE_TAXES'), 'generic.png');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('tax.add', 'JTOOLBAR_NEW');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('tax.edit', 'JTOOLBAR_EDIT');
     }
     if ($canDo->get('core.edit.state')) {
         if ($state->get('filter.state') != 2) {
             JToolBarHelper::divider();
             JToolBarHelper::custom('taxes.publish', 'publish.png', 'publish_f2.png', 'JTOOLBAR_PUBLISH', true);
             JToolBarHelper::custom('taxes.unpublish', 'unpublish.png', 'unpublish_f2.png', 'JTOOLBAR_UNPUBLISH', true);
         }
         if ($state->get('filter.state') != -1) {
             JToolBarHelper::divider();
             if ($state->get('filter.state') != 2) {
                 JToolBarHelper::archiveList('taxes.archive', 'JTOOLBAR_ARCHIVE');
             } else {
                 if ($state->get('filter.state') == 2) {
                     JToolBarHelper::unarchiveList('taxes.publish', 'JTOOLBAR_UNARCHIVE');
                 }
             }
         }
     }
     if ($state->get('filter.state') == -2 && $canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'taxes.delete', 'JTOOLBAR_EMPTY_TRASH');
     } else {
         if ($canDo->get('core.edit.state')) {
             JToolBarHelper::trash('taxes.trash', 'JTOOLBAR_TRASH');
         }
     }
     if ($canDo->get('core.admin')) {
         JToolBarHelper::divider();
         JToolBarHelper::preferences('com_solidres');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('screen.tax', 'JTOOLBAR_HELP');
 }
Example #12
0
 /**
  * Method to get the field input markup.
  *
  * @return	string	The field input markup.
  * @since	1.6
  */
 protected function getInput()
 {
     // Initialize variables.
     $html = array();
     $options = array();
     $doc = JFactory::getDocument();
     $currentId = 0;
     // When use this field in view/reservationasset/edit
     $selectedId = (int) $this->form->getValue('category_id');
     // When use this field in view/category/edit
     if (empty($selectedId)) {
         $selectedId = (int) $this->form->getValue('parent_id');
     }
     // Set the default view name and format from the Request.
     $vName = JRequest::getWord('view', 'category');
     // if we are editing a category, hide it in the parent_id category select list
     if ($vName == 'category') {
         $currentId = (int) $this->form->getValue('id');
     }
     $options = SolidresHelper::getCategoryOptions($currentId);
     $html[] = JHtml::_('select.genericlist', $options, $this->name, null, 'value', 'text', $selectedId);
     return implode($html);
 }
Example #13
0
 /**
  * Add the page title and toolbar.
  *
  * @since	1.6
  */
 protected function addToolbar()
 {
     $state = $this->get('State');
     $canDo = SolidresHelper::getActions();
     JToolBarHelper::title(JText::_('SR_MANAGE_CUSTOMERS'), 'generic.png');
     if ($canDo->get('core.create')) {
         JToolBarHelper::addNew('customer.add', 'JTOOLBAR_NEW');
     }
     if ($canDo->get('core.edit')) {
         JToolBarHelper::editList('customer.edit', 'JTOOLBAR_EDIT');
     }
     if ($canDo->get('core.edit.state')) {
         JToolbarHelper::divider();
         //JToolbarHelper::publish('customers.activate', 'SR_TOOLBAR_ACTIVATE', true);
         JToolbarHelper::unpublish('customers.block', 'SR_TOOLBAR_BLOCK', true);
         JToolbarHelper::custom('customers.unblock', 'unblock.png', 'unblock_f2.png', 'SR_TOOLBAR_UNBLOCK', true);
         JToolbarHelper::divider();
     }
     if ($canDo->get('core.delete')) {
         JToolBarHelper::deleteList('', 'customers.delete', 'JTOOLBAR_DELETE');
     }
     JToolBarHelper::divider();
     JToolBarHelper::help('screen.customer', 'JTOOLBAR_HELP');
 }
Example #14
0
 /**
  * Method to save a record.
  *
  * @param   string  $key	The name of the primary key of the URL variable.
  * @param   string  $urlVar	The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
  *
  * @return  boolean  True if successful, false otherwise.
  * @since   11.1
  */
 public function save($key = null, $urlVar = null)
 {
     // Check for request forgeries.
     JSession::checkToken('GET') or jexit(JText::_('JINVALID_TOKEN'));
     $app = JFactory::getApplication();
     $lang = JFactory::getLanguage();
     $model = $this->getModel();
     $table = $model->getTable();
     $data = JRequest::getVar('jform', array(), 'post', 'array');
     $checkin = property_exists($table, 'checked_out');
     $context = "{$this->option}.edit.{$this->context}";
     $task = $this->getTask();
     // Determine the name of the primary key for the data.
     if (empty($key)) {
         $key = $table->getKeyName();
     }
     // To avoid data collisions the urlVar may be different from the primary key.
     if (empty($urlVar)) {
         $urlVar = $key;
     }
     $recordId = JRequest::getInt($urlVar);
     $session = JFactory::getSession();
     $registry = $session->get('registry');
     if (!$this->checkEditId($context, $recordId)) {
         // Somehow the person just went to the form and tried to save it. We don't allow that.
         $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $recordId));
         $this->setMessage($this->getError(), 'error');
         $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list . $this->getRedirectToListAppend(), false));
         return false;
     }
     // Populate the row id from the session.
     $data[$key] = $recordId;
     // Access check.
     if (!$this->allowSave($data, $key)) {
         $this->setError(JText::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED'));
         $this->setMessage($this->getError(), 'error');
         $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list . $this->getRedirectToListAppend(), false));
         return false;
     }
     // Validate the posted data.
     // Sometimes the form needs some posted data, such as for plugins and modules.
     $form = $model->getForm($data, false);
     if (!$form) {
         $app->enqueueMessage($model->getError(), 'error');
         return false;
     }
     // Test whether the data is valid.
     $validData = $model->validate($form, $data);
     // Check for validation errors.
     if ($validData === false) {
         // Get the validation messages.
         $errors = $model->getErrors();
         // Push up to three validation messages out to the user.
         for ($i = 0, $n = count($errors); $i < $n && $i < 3; $i++) {
             if ($errors[$i] instanceof Exception) {
                 $app->enqueueMessage($errors[$i]->getMessage(), 'warning');
             } else {
                 $app->enqueueMessage($errors[$i], 'warning');
             }
         }
         // Save the data in the session.
         $app->setUserState($context . '.data', $data);
         // Redirect back to the edit screen.
         $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_item . $this->getRedirectToItemAppend($recordId, $key), false));
         return false;
     }
     // Attempt to save the data.
     if (!$model->save($validData)) {
         // Save the data in the session.
         $app->setUserState($context . '.data', $validData);
         // Redirect back to the edit screen.
         $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_SAVE_FAILED', $model->getError()));
         $this->setMessage($this->getError(), 'error');
         $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_item . $this->getRedirectToItemAppend($recordId, $key), false));
         return false;
     }
     // Save succeeded, so check-in the record.
     if ($checkin && $model->checkin($validData[$key]) === false) {
         // Save the data in the session.
         $app->setUserState($context . '.data', $validData);
         // Check-in failed, so go back to the record and display a notice.
         $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_CHECKIN_FAILED', $model->getError()));
         $this->setMessage($this->getError(), 'error');
         $this->setRedirect('index.php?option=' . $this->option . '&view=' . $this->view_item . $this->getRedirectToItemAppend($recordId, $key));
         return false;
     }
     $this->setMessage(JText::_(($lang->hasKey($this->text_prefix . ($recordId == 0 && $app->isSite() ? '_SUBMIT' : '') . '_SAVE_SUCCESS') ? $this->text_prefix : 'JLIB_APPLICATION') . ($recordId == 0 && $app->isSite() ? '_SUBMIT' : '') . '_SAVE_SUCCESS'));
     // Load saved record
     $savedRecordId = $model->getState($model->getName() . '.id');
     $table->load($savedRecordId);
     $options = SolidresHelper::getCategoryOptions();
     echo json_encode(array('saved' => 'true', 'category_select_html' => JHtmlSelect::options($options, 'value', 'text', $savedRecordId)));
     die(1);
 }
Example #15
0
" title="<?php 
echo JText::_('SR_SEARCH_IN_TITLE');
?>
" />
		                    </th>
		                    <th>
		                        <select name="filter_published" class="inputbox" onchange="this.form.submit()">
		                            <option value=""></option>
		                            <?php 
echo JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true);
?>
		                        </select>
		                    </th>
		                    <th>
		                        <?php 
echo JHtml::_('select.genericlist', SolidresHelper::getCountryOptions(), 'filter_country', 'onchange="this.form.submit()"', 'value', 'text', $this->state->get('filter.country'));
?>
		                    </th>
		                    <th></th>
		                    <th></th>
		                </tr>
					</thead>
					<tfoot>
						<tr>
							<td colspan="7">
								<?php 
echo $this->pagination->getListFooter();
?>
							</td>
						</tr>
					</tfoot>
Example #16
0
echo JText::_('SR_SEARCH_IN_TITLE');
?>
" />
		                    </th>
		                    <th>
		                        <select name="filter_published" class="inputbox" onchange="this.form.submit()">
		                            <option value=""></option>
		                            <?php 
echo JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.state'), true);
?>
		                        </select>
		                    </th>
		                    <th>
		                        <select name="filter_reservation_asset_id" class="inputbox" onchange="this.form.submit()">
		                            <?php 
echo JHtml::_('select.options', SolidresHelper::getReservationAssetOptions(), 'value', 'text', $this->state->get('filter.reservation_asset_id'));
?>
		                        </select>
		                    </th>
		                    <th></th>
		                </tr>
					</thead>
					<tfoot>
						<tr>
							<td colspan="6">
								<?php 
echo $this->pagination->getListFooter();
?>
							</td>
						</tr>
					</tfoot>
Example #17
0
    /**
     * Return html to display guest form in one-page reservation, data is retrieved from user session
     *
     * @return string HTML
     */
    public function getHtmlGuest()
    {
        $this->countries = SolidresHelper::getCountryOptions();
        $this->reservationDetails = $this->app->getUserState($this->context);
        // Try to get the customer information if he/she logged in
        if (!isset($this->reservationDetails->guest)) {
            // Process customer group
            JTable::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR . '/tables', 'SolidresTable');
            $customerTable = JTable::getInstance('Customer', 'SolidresTable');
            $user = JFactory::getUser();
            $customerTable->load(array('user_id' => $user->get('id')));
            if (!empty($customerTable->id)) {
                $this->reservationDetails->guest["customer_firstname"] = $customerTable->firstname;
                $this->reservationDetails->guest["customer_middlename"] = $customerTable->middlename;
                $this->reservationDetails->guest["customer_lastname"] = $customerTable->lastname;
                $this->reservationDetails->guest["customer_email"] = $user->get('email');
            }
        }
        $selectedCountryId = isset($this->reservationDetails->guest["customer_country_id"]) ? $this->reservationDetails->guest["customer_country_id"] : 0;
        $options = array();
        $options[] = JHTML::_('select.option', NULL, JText::_('SR_SELECT'));
        $this->geoStates = $selectedCountryId > 0 ? SolidresHelper::getGeoStateOptions($selectedCountryId) : $options;
        $html = '
			<div class="reservation-box-inner">
				<form enctype="multipart/form-data"
					  id="sr-reservation-form-guest"
					  class="sr-reservation-form form-stacked sr-validate"
					  action="' . JRoute::_("index.php?option=com_solidres&task=reservation.process&step=guest&format=json") . '"
					  method="POST">
					<div class="row-fluid">
						<div class="span6">
							<fieldset>
								<label for="firstname">
									' . JText::_("SR_FIRSTNAME") . '
								</label>
								<input id="firstname"
									   required
									   name="jform[customer_firstname]"
									   type="text"
									   class="inputbox"
									   value="' . (isset($this->reservationDetails->guest["customer_firstname"]) ? $this->reservationDetails->guest["customer_firstname"] : "") . '" />

								<label for="middlename">
									' . JText::_("SR_MIDDLENAME") . '
								</label>
								<input id="middlename"
									   name="jform[customer_middlename]"
									   type="text"
									   class="inputbox"
									   value="' . (isset($this->reservationDetails->guest["customer_middlename"]) ? $this->reservationDetails->guest["customer_middlename"] : "") . '" />

								<label for="lastname">
									' . JText::_("SR_LASTNAME") . '
								</label>
								<input id="lastname"
									   required
									   name="jform[customer_lastname]"
									   type="text"
									   class="inputbox"
									   value="' . (isset($this->reservationDetails->guest["customer_lastname"]) ? $this->reservationDetails->guest["customer_lastname"] : "") . '" />

								<label for="email">
									' . JText::_("SR_EMAIL") . '
								</label>
								<input id="email"
									   required
									   name="jform[customer_email]"
									   type="text"
									   class="inputbox"
									   value="' . (isset($this->reservationDetails->guest["customer_email"]) ? $this->reservationDetails->guest["customer_email"] : "") . '" />

								<label for="phonenumber">
									' . JText::_("SR_PHONENUMBER") . '
								</label>
								<input id="phonenumber"
									   required
									   name="jform[customer_phonenumber]"
									   type="text"
									   class="inputbox"
									   value="' . (isset($this->reservationDetails->guest["customer_phonenumber"]) ? $this->reservationDetails->guest["customer_phonenumber"] : "") . '" />

								<label for="company">
									' . JText::_("SR_COMPANY") . '
								</label>
								<input id="company"
									   name="jform[customer_company]"
									   type="text"
									   class="inputbox"
									   value="' . (isset($this->reservationDetails->guest["customer_company"]) ? $this->reservationDetails->guest["customer_company"] : "") . '" />
							</fieldset>
						</div>

						<div class="span6">
							<fieldset>
								<label for="address_1">
									' . JText::_("SR_ADDRESS_1") . '
								</label>
								<input id="address_1"
									   required
									   name="jform[customer_address1]"
									   type="text"
									   class="inputbox"
									   value="' . (isset($this->reservationDetails->guest["customer_address1"]) ? $this->reservationDetails->guest["customer_address1"] : "") . '" />

								<label for="address_2">
									' . JText::_("SR_ADDRESS_2") . '
								</label>
								<input id="address_2"
									   name="jform[customer_address2]"
									   type="text"
									   class="inputbox"
									   value="' . (isset($this->reservationDetails->guest["customer_address2"]) ? $this->reservationDetails->guest["customer_address2"] : "") . '" />

								<label for="city">' . JText::_("SR_CITY") . '</label>
								<input id="city"
									   required
									   name="jform[customer_city]"
									   type="text"
									   class="inputbox"
									   value="' . (isset($this->reservationDetails->guest["customer_city"]) ? $this->reservationDetails->guest["customer_city"] : "") . '" />

								<label for="zip">' . JText::_("SR_ZIP") . '</label>
								<input id="zip"
									   name="jform[customer_zipcode]"
									   type="text"
									   class="inputbox"
									   value="' . (isset($this->reservationDetails->guest["customer_zipcode"]) ? $this->reservationDetails->guest["customer_zipcode"] : "") . '" />

								<label for="jform[country_id]">' . JText::_("SR_COUNTRY") . '</label>';
        $selectedCountryId = isset($this->reservationDetails->guest["customer_country_id"]) ? $this->reservationDetails->guest["customer_country_id"] : 0;
        $html .= JHtml::_("select.genericlist", $this->countries, "jform[customer_country_id]", array("class" => "country_select inputbox", 'required'), "value", "text", $selectedCountryId, "country");
        $html .= '
								<label for="jform[customer_geo_state_id]">' . JText::_("SR_STATE") . '</label>';
        $selectedGeoStateId = isset($this->reservationDetails->guest["customer_geo_state_id"]) ? $this->reservationDetails->guest["customer_geo_state_id"] : 0;
        $html .= JHtml::_("select.genericlist", $this->geoStates, "jform[customer_geo_state_id]", array("class" => "state_select inputbox"), "value", "text", $selectedGeoStateId, "state");
        $html .= '<label for="note">' . JText::_("SR_NOTE") . '</label>
										<textarea id="note" name="jform[note]" rows="10" cols="30">' . (isset($this->reservationDetails->guest["note"]) ? $this->reservationDetails->guest["note"] : "") . '</textarea>
								<p class="help-block">' . JText::_("SR_RESERVATION_NOTE") . '</p>
							</fieldset>
						</div>
					</div>
					<div class="processing-indicator nodisplay"></div>
					<button class="btn btn-primary" id="" type="submit">
						' . JText::_("SR_BUTTON_RESERVATION_PARTIAL_SUBMIT") . '
					</button>
					' . JHtml::_("form.token") . '
					<input type="hidden" name="jform[next_step]" value="payment" />
				</form>
			</div>
		';
        echo $html;
        die(1);
    }
Example #18
0
							</th>
							<!--
							<th>
								<select name="filter_category_id" class="inputbox" onchange="this.form.submit()">
									<option value=""></option>
									<?php 
echo JHtml::_('select.options', SolidresHelper::getCategoryOptions(), 'value', 'text', $this->state->get('filter.category_id'));
?>
								</select>
							</th>
							-->
							<th></th>
							<th>
								<select name="filter_country_id" class="inputbox" onchange="this.form.submit()">
									<?php 
echo JHtml::_('select.options', SolidresHelper::getCountryOptions(), 'value', 'text', $this->state->get('filter.country_id'));
?>
								</select>
							</th>
							<th>
								<select name="filter_access" class="inputbox" onchange="this.form.submit()">
									<option value=""></option>
									<?php 
echo JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'));
?>
								</select>
							</th>
							<th></th>
					   </tr>
					</thead>
					<tfoot>