Ejemplo n.º 1
0
 function display($tpl = null)
 {
     $this->state = $this->get('State');
     $this->reservationDetails = $this->get("ReservationDetails");
     $this->paymentMethods = $this->get('paymentMethods');
     $this->guestTypes = JHotelReservationHelper::getGuestTypes();
     $this->userData = UserDataService::getUserData();
     $this->hotel = HotelService::getHotel($this->userData->hotelId);
     $this->appSettings = JHotelUtil::getInstance()->getApplicationSettings();
     $doc = JFactory::getDocument();
     $tag = JHotelUtil::getJoomlaLanguage();
     $doc->addStyleSheet('administrator/components/' . getBookingExtName() . '/assets/js/validation/css/validationEngine.jquery.css');
     $doc->addScript('administrator/components/' . getBookingExtName() . '/assets/js/validation/js/languages/jquery.validationEngine-' . $tag . '.js');
     $doc->addScript('administrator/components/' . getBookingExtName() . '/assets/js/validation/js/jquery.validationEngine.js');
     parent::display($tpl);
 }
Ejemplo n.º 2
0
 /**
  * Display the view
  */
 public function display($tpl = null)
 {
     $lang = JFactory::getLanguage();
     $this->item = $this->get('Item');
     $this->state = $this->get('State');
     $this->appSettings = JHotelUtil::getInstance()->getApplicationSettings();
     $this->roomTypes = $this->get('RoomTypesOptions');
     $this->guestTypes = JHotelReservationHelper::getGuestTypes();
     $hotels = $this->get('Hotels');
     $this->hotels = checkHotels(JFactory::getUser()->id, $hotels);
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     parent::display($tpl);
     $this->addToolbar();
 }
Ejemplo n.º 3
0
 function display($tpl = null)
 {
     $this->state = $this->get('State');
     $this->countries = $this->get('Countries');
     $this->guestTypes = JHotelReservationHelper::getGuestTypes();
     $this->userData = UserDataService::getUserData();
     $this->hotel = HotelService::getHotel($this->userData->hotelId);
     $this->appSettings = JHotelUtil::getInstance()->getApplicationSettings();
     if ($this->appSettings->save_all_guests_data) {
         UserDataService::prepareGuestDetails();
     }
     $hotelId = JRequest::getVar("hotel_id");
     $reservedItems = JRequest::getVar("reservedItems");
     if (!empty($reservedItems)) {
         UserDataService::updateRooms($hotelId, $reservedItems);
     }
     $this->reservationDetails = $this->get("ReservationDetails");
     $this->showDiscounts = true;
     parent::display($tpl);
 }
Ejemplo n.º 4
0
    function editReservation()
    {
        $this->item = $this->get('Item');
        $this->state = $this->get('State');
        $this->appSettings = JHotelUtil::getInstance()->getApplicationSettings();
        $this->roomTypes = $this->get('RoomTypesOptions');
        $this->guestTypes = JHotelReservationHelper::getGuestTypes();
        $hotels = $this->get('Hotels');
        $this->hotels = checkHotels(JFactory::getUser()->id, $hotels);
        if (count($errors = $this->get('Errors'))) {
            JError::raiseError(500, implode("\n", $errors));
            return false;
        }
        $doc = JFactory::getDocument();
        $doc->addScriptDeclaration('
			var baseUrl="' . (JURI::base() . '/administrator/index.php?option=' . getBookingExtName()) . '";
		');
        $doc->addScript('administrator/components/' . getBookingExtName() . '/assets/js/reservation.js');
        $tpl = 'editreservation';
        return $tpl;
    }