Commit 68945745 by Tobin

DC

parent bad18390
...@@ -28,8 +28,8 @@ class Venue extends CI_Controller { ...@@ -28,8 +28,8 @@ class Venue extends CI_Controller {
function addVenues(){ function addVenues(){
$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('','1');
$template['regionData'] = $this->Region_model->getRegionData(); $template['regionData'] = $this->Region_model->getRegionData('','1');
$template['page'] = 'Venue/venueAddForm'; $template['page'] = 'Venue/venueAddForm';
$template['menu'] = 'Venue Management'; $template['menu'] = 'Venue Management';
...@@ -68,8 +68,8 @@ class Venue extends CI_Controller { ...@@ -68,8 +68,8 @@ class Venue extends CI_Controller {
} else if ($err == 0 && isset($_POST['has_layout']) && $_POST['has_layout'] == 1 && } else if ($err == 0 && isset($_POST['has_layout']) && $_POST['has_layout'] == 1 &&
(!isset($_POST['seat_color']) || empty($_POST['seat_color']) || !isset($_FILES) || (!isset($_POST['seat_color']) || empty($_POST['seat_color']) || !isset($_FILES) ||
!isset($_POST['seat_price']) || empty($_POST['seat_price']) || empty($_FILES) || !isset($_POST['seat_price']) || empty($_POST['seat_price']) || empty($_FILES) ||
count($_POST['seat_price']) != count($_POST['seat_color'])) || !isset($_FILES['layout_image'])|| count($_POST['seat_price']) != count($_POST['seat_color']) || !isset($_FILES['layout_image']) ||
empty($_FILES['layout_image'])){ empty($_FILES['layout_image']))){
$err = 1; $err = 1;
$errMsg = 'Provide Proper Layout details'; $errMsg = 'Provide Proper Layout details';
} }
......
...@@ -87,13 +87,13 @@ ...@@ -87,13 +87,13 @@
<span class="glyphicon form-control-feedback"></span> <span class="glyphicon form-control-feedback"></span>
</div> </div>
</div> </div>
<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">
<!-- Layout Container --> <!-- Layout Container -->
<?php if(isset($venue_data,$venue_data->layout,$venue_data->layout_details) && <?php if(isset($venue_data,$venue_data->layout,$venue_data->layout_details) &&
!empty($venue_data) && !empty($venue_data->layout) && !empty($venue_data) && !empty($venue_data->layout) &&
!empty($venue_data->layout_details) && !empty($venue_data->layout_details) &&
!empty($layoutDetails = json_decode($venue_data->layout_details))){ ?> !empty($layoutDetails = json_decode($venue_data->layout_details))){ ?>
<input type="hidden" name="has_layout" value='1'>
<div class="col-md-3"> <div class="col-md-3">
<div class="form-group"> <div class="form-group">
<label>Layout</label> <label>Layout</label>
...@@ -197,7 +197,6 @@ ...@@ -197,7 +197,6 @@
<!-- Layout Container --> <!-- Layout Container -->
<div id="layoutCntrHtml" class="hide"> <div id="layoutCntrHtml" class="hide">
<input type="hidden" name="has_layout" value='1'>
<div class="col-md-3"> <div class="col-md-3">
<div class="form-group"> <div class="form-group">
<label>Layout</label> <label>Layout</label>
......
...@@ -116,8 +116,10 @@ function setLayout(){ ...@@ -116,8 +116,10 @@ function setLayout(){
var layoutFlag = jQuery('[name="host_cat_id"]').find(":selected").attr('haveLayout'); var layoutFlag = jQuery('[name="host_cat_id"]').find(":selected").attr('haveLayout');
if(layoutFlag == 1){ if(layoutFlag == 1){
jQuery('[id="has_layout"]').val('1');
jQuery('[id="layoutCntr"]').html(jQuery('[id="layoutCntrHtml"]').html()); jQuery('[id="layoutCntr"]').html(jQuery('[id="layoutCntrHtml"]').html());
} else { } else {
jQuery('[id="has_layout"]').val('0');
jQuery('[id="layoutCntr"]').html(''); jQuery('[id="layoutCntr"]').html('');
} }
} }
......
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