Commit 8382108c by Tobin

Merge branch 'master' into 'dev_production'

Master See merge request !79
parents 58fe37c4 571692c4
...@@ -322,7 +322,7 @@ class Api extends CI_Controller { ...@@ -322,7 +322,7 @@ class Api extends CI_Controller {
public function payNow($auth_token='',$amount=0,$booking_id='',$event_id=''){ public function payNow($auth_token='',$amount=0,$booking_id='',$event_id=''){
if(empty($auth_token) || empty($amount) || empty($booking_id)){ if(empty($auth_token) || empty($amount) || empty($booking_id)){
redirect('https://projects.nuvento.com/failure'); redirect('https://timeout.sa/staging/failure');
} }
$payData = array('auth_token'=>$auth_token,'amount'=>$amount,'booking_id'=>$booking_id); $payData = array('auth_token'=>$auth_token,'amount'=>$amount,'booking_id'=>$booking_id);
$res = $this->Api_model->payNow($payData); $res = $this->Api_model->payNow($payData);
...@@ -331,7 +331,7 @@ class Api extends CI_Controller { ...@@ -331,7 +331,7 @@ class Api extends CI_Controller {
$this->paymentGateway($amount,$res['transaction_id'],$event_id,$booking_id,$res['custData']); $this->paymentGateway($amount,$res['transaction_id'],$event_id,$booking_id,$res['custData']);
} }
else{ else{
redirect('https://projects.nuvento.com/failure?event_id='.$eventid); redirect('https://timeout.sa/staging/failure?event_id='.$eventid);
} }
} }
...@@ -353,7 +353,7 @@ class Api extends CI_Controller { ...@@ -353,7 +353,7 @@ class Api extends CI_Controller {
$booking_id = $last_id[3]; $booking_id = $last_id[3];
$this->Api_model->update_payment($response,$transaction_id,$lastid,'1') ; $this->Api_model->update_payment($response,$transaction_id,$lastid,'1') ;
redirect('https://projects.nuvento.com/bookingdetails?booking_id='.$booking_id); redirect('https://timeout.sa/staging/bookingdetails?booking_id='.$booking_id);
} }
} }
...@@ -376,7 +376,7 @@ class Api extends CI_Controller { ...@@ -376,7 +376,7 @@ class Api extends CI_Controller {
$booking_id = $last_id[3]; $booking_id = $last_id[3];
$this->Api_model->update_payment($response,$transaction_id,$lastid,'0'); $this->Api_model->update_payment($response,$transaction_id,$lastid,'0');
redirect('https://projects.nuvento.com/failure?event_id='.$eventid); redirect('https://timeout.sa/staging/failure?event_id='.$eventid);
} }
} }
...@@ -536,5 +536,17 @@ class Api extends CI_Controller { ...@@ -536,5 +536,17 @@ class Api extends CI_Controller {
public function verifyMail($unique_id = '') { public function verifyMail($unique_id = '') {
$res = $this->Api_model->verifyMail(array('unique_id'=>$unique_id)); $res = $this->Api_model->verifyMail(array('unique_id'=>$unique_id));
} }
public function checkSeatAvailability(){
$data = (array) json_decode(file_get_contents('php://input'));
$data['auth_token'] = $this->auth_token;
$res = $this->Api_model->checkSeatAvailability($data);
if($res['status']!=0){
$this->response($res['data']);
}
else{
$this->errorResponse($res['code'],$res['message']);
}
}
} }
?> ?>
...@@ -134,21 +134,20 @@ class Customer extends CI_Controller { ...@@ -134,21 +134,20 @@ class Customer extends CI_Controller {
$subject = "Your TimeOut Account is now activated"; $subject = "Your TimeOut Account is now activated";
$email_id = $_POST['email']; $email_id = $_POST['email'];
$template = getNotifTemplate(); $template = getNotifTemplate();
$msgContent = "Hi, Welcome to TimeOut. Please use username: ".$_POST['email']."
$message = "<html> for access your account.";
<body> $message = "<html><body>".$msgContent."<br></body></html>";
Hi,\n\r Welcome to TimeOut. \r\n Please use username:
".$_POST['email']." for access your account <br>
</body>
</html>";
if(isset($template['registration_mail']) && !empty($template['registration_mail'])){ if(isset($template['registration_mail']) && !empty($template['registration_mail'])){
$message = str_replace(array('{:email}'),array($email_id), $message=str_replace(array('{:email}'),array($email_id),$template['registration_mail']);
$template['registration_mail']);
} }
$this->Api_model->send_mail($subject,$email_id,$message); $this->Api_model->send_mail($subject,$email_id,$message);
if(isset($template['registration_sms']) && !empty($template['registration_sms'])){
$msgContent=str_replace(array('{:email}'),array($email_id),$template['registration_sms']);
}
$this->Api_model->sendSMS($_POST['phone'],$msgContent);
$flashMsg =array('message'=>'Successfully Updated User Details..!','class'=>'success'); $flashMsg =array('message'=>'Successfully Updated User Details..!','class'=>'success');
$this->session->set_flashdata('message', $flashMsg); $this->session->set_flashdata('message', $flashMsg);
redirect(base_url('Customer/viewCustomers')); redirect(base_url('Customer/viewCustomers'));
......
...@@ -121,6 +121,7 @@ class Event extends CI_Controller { ...@@ -121,6 +121,7 @@ class Event extends CI_Controller {
} else { } else {
$_POST['seat_pricing'] = json_encode( $_POST['seat_pricing'] = json_encode(
array('price'=>$_POST['price'], array('price'=>$_POST['price'],
'capacity'=>$_POST['capacity'],
'price_details'=>$_POST['price_details'], 'price_details'=>$_POST['price_details'],
'price_details_ar'=>$_POST['price_details_ar'] 'price_details_ar'=>$_POST['price_details_ar']
) )
...@@ -187,7 +188,7 @@ class Event extends CI_Controller { ...@@ -187,7 +188,7 @@ class Event extends CI_Controller {
$subject = "TimeOut, New Event Created"; $subject = "TimeOut, New Event Created";
$emailId = $settings['admin_mail_id']; $emailId = $settings['admin_mail_id'];
$message = "<html><body> $message = "<html><body>
New Event Created, event name: <strong>".$_POST['event_name']."</strong>. Event URL : https://projects.nuvento.com/eventdetail?event_id=$event_id New Event Created, event name: <strong>".$_POST['event_name']."</strong>. Event URL : ".base_url()."eventdetail?event_id=$event_id
</body></html>"; </body></html>";
$this->Api_model->send_mail($subject,$emailId,$message); $this->Api_model->send_mail($subject,$emailId,$message);
// END - NEW EVENT NOTIFICATION MAIL \\ // END - NEW EVENT NOTIFICATION MAIL \\
...@@ -297,6 +298,7 @@ class Event extends CI_Controller { ...@@ -297,6 +298,7 @@ class Event extends CI_Controller {
} else { } else {
$_POST['seat_pricing'] = json_encode( $_POST['seat_pricing'] = json_encode(
array('price'=>$_POST['price'], array('price'=>$_POST['price'],
'capacity'=>$_POST['capacity'],
'price_details'=>$_POST['price_details'], 'price_details'=>$_POST['price_details'],
'price_details_ar'=>$_POST['price_details_ar'] 'price_details_ar'=>$_POST['price_details_ar']
) )
......
...@@ -46,9 +46,15 @@ class Notification extends CI_Controller { ...@@ -46,9 +46,15 @@ class Notification extends CI_Controller {
if(!isset($_POST['forgot_sms']) || empty($_POST['forgot_sms'])){ if(!isset($_POST['forgot_sms']) || empty($_POST['forgot_sms'])){
unset($_POST['forgot_sms']); unset($_POST['forgot_sms']);
} }
if(!isset($_POST['booking_sms']) || empty($_POST['booking_sms'])){
unset($_POST['booking_sms']);
}
if(!isset($_POST['verify_mail']) || empty($_POST['verify_mail'])){ if(!isset($_POST['verify_mail']) || empty($_POST['verify_mail'])){
unset($_POST['verify_mail']); unset($_POST['verify_mail']);
} }
if(!isset($_POST['booking_mail']) || empty($_POST['booking_mail'])){
unset($_POST['booking_mail']);
}
if(!isset($_POST['staff_reg_mail']) || empty($_POST['staff_reg_mail'])){ if(!isset($_POST['staff_reg_mail']) || empty($_POST['staff_reg_mail'])){
unset($_POST['staff_reg_mail']); unset($_POST['staff_reg_mail']);
} }
......
...@@ -160,11 +160,13 @@ class Venue extends CI_Controller { ...@@ -160,11 +160,13 @@ class Venue extends CI_Controller {
$template['venue_id'] = $venue_id; $template['venue_id'] = $venue_id;
$template['venue_data'] = $this->Venue_model->getVenueData(decode_param($venue_id)); $template['venue_data'] = $this->Venue_model->getVenueData(decode_param($venue_id));
$region_id = $template['venue_data']->region_id;
$this->load->model('Host_model'); $this->load->model('Host_model');
$this->load->model('Region_model'); $this->load->model('Region_model');
$template['host_data'] = $this->Host_model->getHostCategories(); $template['host_data'] = $this->Host_model->getHostCategories();
$template['regionData'] = $this->Region_model->getRegionData(); $template['regionData'] = $this->Region_model->getRegionData();
$template['localityData'] = $this->Region_model->getLocalityData($region_id,'','1');
$this->load->view('template',$template); $this->load->view('template',$template);
} }
...@@ -243,9 +245,20 @@ class Venue extends CI_Controller { ...@@ -243,9 +245,20 @@ class Venue extends CI_Controller {
$_POST['location_lat'] = $locData['lat']; $_POST['location_lat'] = $locData['lat'];
$_POST['location_lng'] = $locData['lng']; $_POST['location_lng'] = $locData['lng'];
unset($_POST['has_layout'],$_POST['seat_color'],$_POST['seat_price'],$_POST['seat_capacity']); $locality = array();
if(isset($_POST['locality']) && !empty($_POST['locality']) &&
isset($_POST['locality_ar']) && !empty($_POST['locality_ar'])){
$locality['locality'] = $_POST['locality'];
$locality['locality_ar'] = $_POST['locality_ar'];
}
unset($_POST['locality'],$_POST['locality_type'],$_POST['has_layout'],$_POST['seat_color'],
$_POST['seat_price'],$_POST['seat_capacity'],$_POST['locality_ar']);
if($this->session->userdata['user_type'] == 2){
$_POST['provider_id'] = $this->session->userdata['id'];
}
$status = $this->Venue_model->updateVenues(decode_param($venue_id),$_POST); $status = $this->Venue_model->updateVenues(decode_param($venue_id),$_POST,$locality);
if($status == 1){ if($status == 1){
$flashMsg['class'] = 'success'; $flashMsg['class'] = 'success';
$flashMsg['message'] = 'Venue Created'; $flashMsg['message'] = 'Venue Created';
......
...@@ -21,6 +21,7 @@ class Webservice extends CI_Controller { ...@@ -21,6 +21,7 @@ class Webservice extends CI_Controller {
public function __construct() { public function __construct() {
parent::__construct(); parent::__construct();
date_default_timezone_set("Asia/Riyadh");
$this->load->model('Webservice_model'); $this->load->model('Webservice_model');
$this->load->model('Validation_app_model'); $this->load->model('Validation_app_model');
$method = $this->router->fetch_method(); $method = $this->router->fetch_method();
...@@ -103,17 +104,17 @@ class Webservice extends CI_Controller { ...@@ -103,17 +104,17 @@ class Webservice extends CI_Controller {
public function events_details($event_id = null) { public function events_details($event_id = null) {
$data['event_id'] = $_GET['event_id']; $data['event_id'] = $_GET['event_id'];
$data['auth_token'] = $this->auth_token; $data['auth_token'] = $this->auth_token;
$data['event_date_id'] = '';
if($data['event_id'] == null) { if($data['event_id'] == null) {
$this->errorResponse("ER16","Event id is null or empty"); $this->errorResponse("ER16","Event id is null or empty");die;
die; }
if (isset($_GET['event_date_id']) && !empty($_GET['event_date_id'])){
$data['event_date_id'] = $_GET['event_date_id'];
} }
$res = $this->Webservice_model->event($data); $res = $this->Webservice_model->event($data);
if($res['status']!=0){ if($res['status']!=0){
$this->response($res['data']); $this->response($res['data']);
} } else{
else{
$this->errorResponse($res['code'],$res['message']); $this->errorResponse($res['code'],$res['message']);
} }
} }
...@@ -361,17 +362,17 @@ class Webservice extends CI_Controller { ...@@ -361,17 +362,17 @@ class Webservice extends CI_Controller {
} }
public function responseEventList($data) { public function responseEventList($data) {
//print_r($data);exit(); $isLstBookAvail = (isset($data['is_last_booking_avail']))?$data['is_last_booking_avail']:'';
$result = array( $result = array(
'status' => 'success', 'status'=>'success',
'data' => array( 'data'=>array(
'is_last_booking_avail' =>$data['is_last_booking_avail'], 'is_last_booking_avail'=>$isLstBookAvail,
'city_name' =>$data['city_name'], 'city_name'=>(isset($data['city_name']))?$data['city_name']:'',
'events' =>$data['events']), 'events'=>(isset($data['events']))?$data['events']:''
'meta' =>$data['meta'] ),
'meta'=>(isset($data['meta']))?$data['meta']:''
); );
print json_encode($result); print json_encode($result);
} }
public function get_last_booking() { public function get_last_booking() {
...@@ -438,5 +439,22 @@ class Webservice extends CI_Controller { ...@@ -438,5 +439,22 @@ class Webservice extends CI_Controller {
else else
$this->errorResponse($res['code'],$res['message']); $this->errorResponse($res['code'],$res['message']);
} }
public function event_search() {
if(!isset($_GET) || !isset($_GET['query']) || empty($_GET['query'])){
$this->errorResponse('ER18','Search Key Missing');
exit;
}
$data = $_GET;
$data['auth_token'] = $this->auth_token;
$res = $this->Webservice_model->event_search($data);
if($res['status']!=0){
$this->response($res['data']);
}
else{
$this->errorResponse($res['code'],$res['message']);
}
}
} }
?> ?>
...@@ -42,15 +42,15 @@ class Region_model extends CI_Model { ...@@ -42,15 +42,15 @@ class Region_model extends CI_Model {
} }
public function getlocalityData($region_id = '',$locality_id = '', $status = '0'){ public function getlocalityData($region_id = '',$locality_id = '', $status = '0'){
$where = array('status'=>$status); $cond = "status IN (".$status.") ";
if(!empty($region_id)){ if(!empty($region_id)){
$where['region_id'] = $region_id; $cond .= " AND region_id='$region_id' ";
} }
if(!empty($locality_id)){ if(!empty($locality_id)){
$where['id'] = $locality_id; $cond .= " AND id='$locality_id' ";
} }
$data = $this->db->get_where('locality',$where); $locData = $this->db->query("SELECT * FROM locality WHERE ".$cond);
return $data->result(); return (!empty($locality_id))?$locData->row():$locData->result();
} }
} }
?> ?>
...@@ -4,7 +4,8 @@ class Validation_app_model extends CI_Model { ...@@ -4,7 +4,8 @@ class Validation_app_model extends CI_Model {
public $validation_array = array( public $validation_array = array(
'login'=> array('email'=>array('required'=>array('code'=>'ER02', 'message'=>'Email id is null or empty'), 'login'=> array('email'=>array('required'=>array('code'=>'ER02', 'message'=>'Email id is null or empty'),
'email'=>array('code'=>'ER03', 'message'=>'Invalid Email id')), 'email'=>array('code'=>'ER03', 'message'=>'Invalid Email id')),
'password'=>array('required'=>array('code'=>'ER04', 'message'=>'Password is null or empty'),)), 'password'=>array('required'=>array('code'=>'ER04', 'message'=>'Password is null or empty')),
'language'=>array('required'=>array('code'=>'ER05','message'=>'Language is null or empty'))),
'check_email_availability'=> array('email'=>array('required'=>array('code'=>'ER02', 'message'=>'Email id is null or empty'), 'check_email_availability'=> array('email'=>array('required'=>array('code'=>'ER02', 'message'=>'Email id is null or empty'),
'email'=>array('code'=>'ER03', 'message'=>'Invalid Email id') 'email'=>array('code'=>'ER03', 'message'=>'Invalid Email id')
), ),
...@@ -13,16 +14,14 @@ class Validation_app_model extends CI_Model { ...@@ -13,16 +14,14 @@ class Validation_app_model extends CI_Model {
), ),
), ),
'registration'=> array('email'=>array('required'=>array('code'=>'ER02', 'message'=>'Email id is null or empty'), 'registration'=> array('email'=>array('required'=>array('code'=>'ER02', 'message'=>'Email id is null or empty'),
'email'=>array('code'=>'ER03', 'message'=>'Invalid Email id') 'email'=>array('code'=>'ER03', 'message'=>'Invalid Email id')),
),
'phone'=>array('required'=>array('code'=>'ER07', 'message'=>'Phone no is null or empty'), 'phone'=>array('required'=>array('code'=>'ER07', 'message'=>'Phone no is null or empty'),
'phone'=>array('code'=>'ER08', 'message'=>'Invalid Phone no'), 'phone'=>array('code'=>'ER08', 'message'=>'Invalid Phone no'),
), ),
'name'=>array('required'=>array('code'=>'ER04', 'message'=>'Name is null or empty'), 'name'=>array('required'=>array('code'=>'ER04', 'message'=>'Name is null or empty'),
), ),
'password'=>array('required'=>array('code'=>'ER04', 'message'=>'Password is null or empty'), 'password'=>array('required'=>array('code'=>'ER04','message'=>'Password is null or empty')),
) 'password'=>array('required'=>array('code'=>'ER04','message'=>'Password is null or empty'))),
),
'get_events_list'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'), 'get_events_list'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),
) )
), ),
...@@ -35,6 +34,7 @@ class Validation_app_model extends CI_Model { ...@@ -35,6 +34,7 @@ class Validation_app_model extends CI_Model {
'get_category_list'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'), 'get_category_list'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),
) )
), ),
'event_search'=>array(),
'get_last_booking'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'), 'get_last_booking'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),
......
...@@ -104,6 +104,20 @@ class Validation_model extends CI_Model { ...@@ -104,6 +104,20 @@ class Validation_model extends CI_Model {
) , ) ,
) , ) ,
) , ) ,
'checkSeatAvailability' => array(
'event_id' => array(
'required' => array(
'code' => 'ER17',
'message' => 'Event Id is null or empty'
) ,
) ,
'time_id' => array(
'required' => array(
'code' => 'ER18',
'message' => 'Time Id is null or empty'
)
)
) ,
'bookingdetails' => array( 'bookingdetails' => array(
'auth_token' => array( 'auth_token' => array(
'required' => array( 'required' => array(
......
...@@ -42,10 +42,20 @@ class Venue_model extends CI_Model { ...@@ -42,10 +42,20 @@ class Venue_model extends CI_Model {
return $status; return $status;
} }
public function updateVenues($venue_id = '', $venueData = array()){ public function updateVenues($venue_id = '', $venueData = array(), $locality = array()){
if(empty($venue_id) || empty($venueData)){ if(empty($venue_id) || empty($venueData)){
return 0; return 0;
} }
if(!empty($locality)){
$status = $this->db->insert('locality',
array('locality'=>$locality['locality'],
'locality_ar'=>$locality['locality_ar'],
'region_id'=>$venueData['region_id']));
if($status){
$venueData['locality_id'] = $this->db->insert_id();
}
}
$status = $this->db->update('venue',$venueData,array('id'=>$venue_id)); $status = $this->db->update('venue',$venueData,array('id'=>$venue_id));
return $status; return $status;
} }
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<th width="130px;">Scheduled On</th> <th width="130px;">Scheduled On</th>
<th width="50px;">Amount</th> <th width="50px;">Amount</th>
<th width="50px;">Status</th> <th width="50px;">Status</th>
<th width="150px;">Action</th> <th width="40px;">Action</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -75,9 +75,9 @@ ...@@ -75,9 +75,9 @@
<a class="btn btn-sm btn-info" id="viewBooking" booking_id="<?= encode_param($booking->booking_id) ?>"> <a class="btn btn-sm btn-info" id="viewBooking" booking_id="<?= encode_param($booking->booking_id) ?>">
<i class="fa fa-fw fa-eye"></i>View <i class="fa fa-fw fa-eye"></i>View
</a> </a>
<a class="btn btn-sm btn-danger" status="2" onclick="confirmDelete(jQuery(this),'Booking/changeStatus',{'booking_id':'<?= encode_param($booking->booking_id) ?>'})"> <!-- <a class="btn btn-sm btn-danger" status="2" onclick="confirmDelete(jQuery(this),'Booking/changeStatus',{'booking_id':'<?= encode_param($booking->booking_id) ?>'})">
<i class="fa fa-fw fa-trash"></i>Delete <i class="fa fa-fw fa-trash"></i>Delete
</a> </a> -->
<?php } ?> <?php } ?>
</td> </td>
</tr> </tr>
......
...@@ -269,22 +269,29 @@ ...@@ -269,22 +269,29 @@
<div class="form-group"> <div class="form-group">
<label>Price</label> <label>Price</label>
<input type="text" class="form-control required" placeholder="Price" <input type="text" class="form-control required" placeholder="Price"
data-parsley-trigger="change" data-parsley-minlength="2" data-parsley-pattern="^[0-9\ . \/]+$" name="price" data-parsley-trigger="change" data-parsley-minlength="1" data-parsley-pattern="^[0-9\ . \/]+$" name="price">
required>
</div> </div>
</div> </div>
<div class="col-sm-5"> <div class="col-sm-2">
<div class="form-group">
<label>Capacity</label>
<input type="text" class="form-control required" placeholder="Provide Capacity"
data-parsley-trigger="change" data-parsley-minlength="1"
name="capacity" data-parsley-pattern="^[0-9\ . \/]+$">
</div>
</div>
<div class="col-sm-4">
<div class="form-group"> <div class="form-group">
<label>About Price Division (English)</label> <label>About Price Division (English)</label>
<textarea type="text" class="ip_reg_form_input form-control reset-form-custom required" placeholder="Price Division (English)" name="price_details" required <textarea type="text" class="ip_reg_form_input form-control reset-form-custom required" placeholder="Price Division (English)" name="price_details" required
style="height:35px; min-height:35px; max-width: 410px; min-width: 410px;" data-parsley-trigger="change" data-parsley-minlength="2"></textarea> style="height:35px; min-height:35px; max-width: 300px; min-width: 330px;" data-parsley-trigger="change" data-parsley-minlength="2"></textarea>
</div> </div>
</div> </div>
<div class="col-sm-5"> <div class="col-sm-4">
<div class="form-group"> <div class="form-group">
<label>About Price Division (Arabic)</label> <label>About Price Division (Arabic)</label>
<textarea type="text" class="ip_reg_form_input form-control reset-form-custom required" placeholder="Price Division (Arabic)" name="price_details_ar" required <textarea type="text" class="ip_reg_form_input form-control reset-form-custom required" placeholder="Price Division (Arabic)" name="price_details_ar" required
style="height:35px; min-height:35px; max-width: 410px; min-width: 410px;" data-parsley-trigger="change" data-parsley-minlength="2"></textarea> style="height:35px; min-height:35px; max-width: 300px; min-width: 330px;" data-parsley-trigger="change" data-parsley-minlength="2"></textarea>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -303,21 +303,28 @@ ...@@ -303,21 +303,28 @@
<div class="form-group"> <div class="form-group">
<label>Price</label> <label>Price</label>
<input type="text" class="form-control required" placeholder="Price" <input type="text" class="form-control required" placeholder="Price"
data-parsley-trigger="change" data-parsley-minlength="2" data-parsley-pattern="^[0-9\ . \/]+$" name="price" name="price" data-parsley-trigger="change" data-parsley-minlength="1" data-parsley-pattern="^[0-9\ . \/]+$" value="<?= $seat_pricing['price'] ?>">
value="<?= $seat_pricing['price'] ?>"
required>
</div> </div>
</div> </div>
<div class="col-sm-5"> <div class="col-sm-2">
<div class="form-group">
<label>Capacity</label>
<input class="form-control required" placeholder="Provide Capacity"
type="text" data-parsley-trigger="change" data-parsley-minlength="1"
value="<?=isset($seat_pricing['capacity'])?$seat_pricing['capacity']:''?>"
name="capacity" data-parsley-pattern="^[0-9\ . \/]+$">
</div>
</div>
<div class="col-sm-4">
<div class="form-group"> <div class="form-group">
<label>About Price Division</label> <label>About Price Division (English)</label>
<textarea type="text" class="ip_reg_form_input form-control reset-form-custom required" placeholder="Price Division (English)" name="price_details" required <textarea type="text" class="ip_reg_form_input form-control reset-form-custom required" placeholder="Price Division (English)" name="price_details" required
style="height:35px;" data-parsley-trigger="change" data-parsley-minlength="2"><?= $seat_pricing['price_details'] ?></textarea> style="height:35px;" data-parsley-trigger="change" data-parsley-minlength="2"><?= $seat_pricing['price_details'] ?></textarea>
</div> </div>
</div> </div>
<div class="col-sm-5"> <div class="col-sm-4">
<div class="form-group"> <div class="form-group">
<label>About Price Division</label> <label>About Price Division (Arabic)</label>
<textarea type="text" class="ip_reg_form_input form-control reset-form-custom required" placeholder="Price Division (Arabic)" name="price_details_ar" required <textarea type="text" class="ip_reg_form_input form-control reset-form-custom required" placeholder="Price Division (Arabic)" name="price_details_ar" required
style="height:35px;" data-parsley-trigger="change" data-parsley-minlength="2"><?= (isset($seat_pricing['price_details_ar']))?$seat_pricing['price_details_ar']:'' ?></textarea> style="height:35px;" data-parsley-trigger="change" data-parsley-minlength="2"><?= (isset($seat_pricing['price_details_ar']))?$seat_pricing['price_details_ar']:'' ?></textarea>
</div> </div>
......
...@@ -85,6 +85,17 @@ ...@@ -85,6 +85,17 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-sm-12">
<div class="col-sm-6">
<div class="form-group">
<label>Booking Mail</label>
<p>Event Name => {:event_name} , Booking ID => {:booking_id} , Time => {:time}</p>
<textarea id="rich_editor_10" type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Booking Mail" name="booking_mail"
style="height:108px;" data-parsley-trigger="change"><?= $notificationData->booking_mail ?></textarea>
</div>
</div>
</div>
</div> </div>
<div class="box-header with-border"> <div class="box-header with-border">
...@@ -95,15 +106,25 @@ ...@@ -95,15 +106,25 @@
<div class="col-sm-6"> <div class="col-sm-6">
<div class="form-group"> <div class="form-group">
<label>Registration SMS</label> <label>Registration SMS</label>
<p>Email => {:email}</p>
<textarea type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Registration SMS" name="registration_sms" style="height:108px;" data-parsley-trigger="change"><?= $notificationData->registration_sms ?></textarea> <textarea type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Registration SMS" name="registration_sms" style="height:108px;" data-parsley-trigger="change"><?= $notificationData->registration_sms ?></textarea>
</div> </div>
</div> </div>
<div class="col-sm-6"> <!-- <div class="col-sm-6">
<div class="form-group"> <div class="form-group">
<label>Forgot SMS</label> <label>Forgot SMS</label>
<p>URL => {:url}</p>
<textarea type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Forgot SMS" name="forgot_sms" style="height:108px;" data-parsley-trigger="change"><?= $notificationData->forgot_sms ?></textarea> <textarea type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Forgot SMS" name="forgot_sms" style="height:108px;" data-parsley-trigger="change"><?= $notificationData->forgot_sms ?></textarea>
</div> </div>
</div> -->
<div class="col-sm-6">
<div class="form-group">
<label>Booking SMS</label>
<p>Event Name => {:event_name} , Booking ID => {:booking_id} , Time => {:time}</p>
<textarea type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Booking SMS" name="booking_sms" style="height:108px;" data-parsley-trigger="change"><?= $notificationData->booking_sms ?></textarea>
</div>
</div> </div>
</div> </div>
......
...@@ -124,6 +124,10 @@ ...@@ -124,6 +124,10 @@
<label>Android Playstore URL</label> <label>Android Playstore URL</label>
<input type="text" name="android_playstore_url" class="form-control required" placeholder="Enter Android Playstore URL" value="<?= $data['android_playstore_url'] ?>"> <input type="text" name="android_playstore_url" class="form-control required" placeholder="Enter Android Playstore URL" value="<?= $data['android_playstore_url'] ?>">
</div> </div>
<div class="form-group col-xs-6">
<label>Force Update App</label>
<input type="text" name="force_update" class="form-control required" placeholder="Force Update App (0/1)" value="<?=$data['force_update']?>" data-parsley-pattern="^[0,1]+$">
</div>
</div> </div>
</div> </div>
<div class="box-footer" style="padding-left:46%"> <div class="box-footer" style="padding-left:46%">
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<script src="<?= base_url('assets/js/bootbox.min.js') ?>"></script> <script src="<?= base_url('assets/js/bootbox.min.js') ?>"></script>
<script src="<?= base_url('assets/js/app.min.js') ?>"></script> <script src="<?= base_url('assets/js/app.min.js') ?>"></script>
<script src="<?= base_url('assets/js/locationpicker.js') ?>" type="text/javascript"></script> <script src="<?= base_url('assets/js/locationpicker.js') ?>" type="text/javascript"></script>
<script src="<?= base_url('assets/js/custom-script.js') ?>"></script> <script src="<?= base_url('assets/js/custom-script.js?ts='.time()) ?>"></script>
<script src="<?= base_url('assets/js/parsley.min.js') ?>"></script> <script src="<?= base_url('assets/js/parsley.min.js') ?>"></script>
<script src="https://cdn.ckeditor.com/4.5.7/standard/ckeditor.js"></script> <script src="https://cdn.ckeditor.com/4.5.7/standard/ckeditor.js"></script>
<script src="<?= base_url('assets/js/bootstrap-datepicker.js') ?>"></script> <script src="<?= base_url('assets/js/bootstrap-datepicker.js') ?>"></script>
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
if(jQuery('#rich_editor_6').length==1){CKEDITOR.replace('rich_editor_6');} if(jQuery('#rich_editor_6').length==1){CKEDITOR.replace('rich_editor_6');}
if(jQuery('#rich_editor_8').length==1){CKEDITOR.replace('rich_editor_8');} if(jQuery('#rich_editor_8').length==1){CKEDITOR.replace('rich_editor_8');}
if(jQuery('#rich_editor_9').length==1){CKEDITOR.replace('rich_editor_9');} if(jQuery('#rich_editor_9').length==1){CKEDITOR.replace('rich_editor_9');}
if(jQuery('#rich_editor_10').length==1){CKEDITOR.replace('rich_editor_10');}
if(jQuery('#rich_editor_3').length==1){CKEDITOR.replace('rich_editor_3',{language:'ar'});} if(jQuery('#rich_editor_3').length==1){CKEDITOR.replace('rich_editor_3',{language:'ar'});}
if(jQuery('#rich_editor_4').length==1){CKEDITOR.replace('rich_editor_4',{language:'ar'});} if(jQuery('#rich_editor_4').length==1){CKEDITOR.replace('rich_editor_4',{language:'ar'});}
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="box box-warning"> <div class="box box-warning">
<div class="box-body"> <div class="box-body">
<form role="form" action="<?= base_url($url) ?>" method="post" <form name="venueForm" role="form" action="<?= base_url($url) ?>" method="post"
class="validate" data-parsley-validate="" enctype="multipart/form-data"> class="validate" data-parsley-validate="" enctype="multipart/form-data">
<div class="col-md-6"> <div class="col-md-6">
<?php if(!empty($regionData)){ ?> <?php if(!empty($regionData)){ ?>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<span class="glyphicon form-control-feedback"></span> <span class="glyphicon form-control-feedback"></span>
</div> </div>
<?php if(!isset($venue_id) || empty($venue_id)){ ?> <?php if(!isset($venue_id) || empty($venue_id)){ ?>
<div class="form-group" style="padding-top: 5px;"> <div id="locality_block" class="form-group disable-div" style="padding-top: 5px;">
<label id="localityLabel">Venue Locality</label> <label id="localityLabel">Venue Locality</label>
<div id="showType" class="hide"> <div id="showType" class="hide">
<div class="col-md-5"> <div class="col-md-5">
...@@ -109,17 +109,58 @@ ...@@ -109,17 +109,58 @@
<select name="locality_id" class="form-control" placeholder="Select Locality"></select> <select name="locality_id" class="form-control" placeholder="Select Locality"></select>
</div> </div>
</div> </div>
<?php } else { ?>
<div id="locality_block" class="form-group" style="padding-top: 5px;">
<label id="localityLabel">Venue Locality</label>
<div id="showType">
<div class="col-md-5">
<input type="radio" name="locality_type" value="0" checked>
<label class="padAll-10">Use Existing Locality</label>
</div>
<div class="col-md-4">
<input class="marginLeft15" type="radio" name="locality_type" value="1">
<label class="padAll-10">Add New Locality</label>
</div>
</div>
<div id="addNew" class="form-group hide">
<div style="width:49%;display:inline-block;">
<input type="text" class="form-control" data-parsley-trigger="change"
name="locality" placeholder="Locality (English)">
</div>
<div style="width:49%;display:inline-block;">
<input type="text" class="form-control" data-parsley-trigger="change"
name="locality_ar" placeholder="Locality (Arabic)">
</div>
</div>
<div id="useExist" class="form-group">
<select name="locality_id" class="form-control required"
placeholder="Select Locality">
<option selected disabled>Choose a Locality</option>
<?php
if(!empty($localityData)){
foreach ($localityData as $locality) {
$select = (isset($venue_data->locality_id) && $venue_data->locality_id == $locality->id)?'selected':'';
echo '<option '.$select.' value="'.$locality->id.'">'.
$locality->locality.
'</option>';
}
}
?>
</select>
</div>
</div>
<?php } ?> <?php } ?>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label>Venue Address</label> <label>Venue Address</label>
<input type="text" class="form-control required" data-parsley-trigger="change" required name="location" placeholder="Venue Address" value="<?= (isset($venue_data->location))?$venue_data->location:'' ?>"> <input type="text" class="form-control" data-parsley-trigger="change" name="location" placeholder="Venue Address" value="<?= (isset($venue_data->location))?$venue_data->location:'' ?>">
</div> </div>
<input type="hidden" id="gooLocLat" value="<?= (isset($venue_data->location_lat) && !empty($venue_data->location_lat))?$venue_data->location_lat:'' ?>" /> <input type="hidden" id="gooLocLat" value="<?= (isset($venue_data->location_lat) && !empty($venue_data->location_lat))?$venue_data->location_lat:'' ?>" />
<input type="hidden" id="gooLocLng" value="<?= (isset($venue_data->location_lng) && !empty($venue_data->location_lng))?$venue_data->location_lng:'' ?>" /> <input type="hidden" id="gooLocLng" value="<?= (isset($venue_data->location_lng) && !empty($venue_data->location_lng))?$venue_data->location_lng:'' ?>" />
<input type="hidden" id="gooLocZoom" value="<?= (isset($venue_data->location))?15:0 ?>"/> <input type="hidden" id="gooLocZoom" value="<?= (isset($venue_data->location))?15:0 ?>"/>
<div id="locPointerMap" style="height: 352px;"></div> <div id="locPointerMap" style="height:355px;"></div>
</div> </div>
<input id="has_layout" type="hidden" name="has_layout" value='0'> <input id="has_layout" type="hidden" name="has_layout" value='0'>
<div class="col-md-12" id="layoutCntr" class="hide"> <div class="col-md-12" id="layoutCntr" class="hide">
...@@ -218,7 +259,7 @@ ...@@ -218,7 +259,7 @@
</div> </div>
<div class="col-md-12 padTop10"> <div class="col-md-12 padTop10">
<div class="box-footer textCenterAlign"> <div class="box-footer textCenterAlign">
<button type="submit" class="btn btn-primary">Submit</button> <button id="venueAddBtn" type="button" class="btn btn-primary">Submit</button>
<a href="<?= base_url('Venue/listVenues') ?>" class="btn btn-primary">Cancel</a> <a href="<?= base_url('Venue/listVenues') ?>" class="btn btn-primary">Cancel</a>
</div> </div>
</div> </div>
......
...@@ -683,3 +683,11 @@ ...@@ -683,3 +683,11 @@
.datepicker{ .datepicker{
z-index: 9999 !important; z-index: 9999 !important;
} }
.disable-div {
-webkit-filter: blur(1px) !important;
pointer-events: none;
cursor: default;
text-decoration: none;
color: black;
}
\ No newline at end of file
...@@ -804,6 +804,8 @@ jQuery('[name="region_id"]').on('change',function(){ ...@@ -804,6 +804,8 @@ jQuery('[name="region_id"]').on('change',function(){
jQuery('[id="useExist"]').addClass('hide'); jQuery('[id="useExist"]').addClass('hide');
jQuery('[name="locality_id"]').prop("disabled",true); jQuery('[name="locality_id"]').prop("disabled",true);
jQuery('[name="locality_id"]').removeClass("required"); jQuery('[name="locality_id"]').removeClass("required");
jQuery('[id="locality_block"]').removeClass("disable-div");
} }
if(resp_data['status'] == 1){ if(resp_data['status'] == 1){
...@@ -825,6 +827,8 @@ jQuery('[name="region_id"]').on('change',function(){ ...@@ -825,6 +827,8 @@ jQuery('[name="region_id"]').on('change',function(){
jQuery.each(resp_data['data'], function(key, data) { jQuery.each(resp_data['data'], function(key, data) {
jQuery('[name="locality_id"]').append(jQuery("<option></option>").attr("value",data['id']).text(data['locality'])); jQuery('[name="locality_id"]').append(jQuery("<option></option>").attr("value",data['id']).text(data['locality']));
}); });
jQuery('[id="locality_block"]').removeClass("disable-div");
} }
} }
}); });
...@@ -935,3 +939,8 @@ function confirmDelete(thisObj,fnName,params){ ...@@ -935,3 +939,8 @@ function confirmDelete(thisObj,fnName,params){
updateStatus(thisObj,fnName,params,status); updateStatus(thisObj,fnName,params,status);
} }
} }
jQuery('[id="venueAddBtn"]').on('click',function(event) {
jQuery('[name="location"]').addClass('required');
jQuery('[name="venueForm"]').submit();
});
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment