Exemplo n.º 1
0
 public function display($tpl = null)
 {
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     $user = JBFactory::getAccount();
     $this->user = $user->user;
     $this->customer = $user->customer->table;
     //$this->station = AirportHelper::getItem($this->customer->city);
     //		debug($this->station);
     //		debug($this->customer);
     //Check agent
     $this->isAgent = BookProHelper::isAgent();
     //Add bootstrap
     JHtml::_('bootstrap.tooltip');
     JHtml::_('behavior.multiselect');
     JHtml::_('formbehavior.chosen', 'select');
     parent::display($tpl);
 }
Exemplo n.º 2
0
 public function __construct($id = false, $typeChart = false, $option = false, $title = false)
 {
     if (!class_exists('BookProHelper')) {
         AImporter::helper('bookpro');
     }
     //Check is backend or frontend
     if (JFactory::getApplication()->isAdmin()) {
         $this->isBackend = true;
     } else {
         $this->isBackend = false;
     }
     $this->isAgent = BookProHelper::isAgent();
     if ($id) {
         $this->id = $id;
     }
     if ($typeChart) {
         $this->typeChart = $typeChart;
     } else {
         $this->typeChart = 'LineChart';
     }
     $this->optionChart = $option;
     $this->titleChart = $title;
 }
Exemplo n.º 3
0
<?php

defined('_JEXEC') or die('Restricted access');
/* @var $this BookingViewCustomer */
$isAgent = BookProHelper::isAgent($this->item->user);
?>

<script type="text/javascript">
	jQuery(document).ready(function($) {
		var hold = $('input[name="jform[hold]"]:checked', '#adminForm').val();		
		if(hold == 0){
			$('#jb_hold_duration').hide();
		}
		$('input[name="jform[hold]"]').click(function(){			
			hold = $('input[name="jform[hold]"]:checked', '#adminForm').val();			
			if(hold == 0){
				$('#jb_hold_duration').hide();
			}
			else{
				$('#jb_hold_duration').show();
			}
		});
	});
</script>

<form action="<?php 
echo JRoute::_('index.php?option=com_bookpro&layout=edit&id=' . (int) $this->item->id);
?>
" method="post" name="adminForm" id="adminForm" class="form-validate">	
<?php 
echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'tab1'));