		<style type="text/css">
			body .modal {
	    /* new custom width */
	    width: 750px;
	    /* must be half of the width, minus scrollbar on the left (30px) */
	    margin-left: -375px;
			}
			</style>
            <form role="form" class="form-horizontal" id="create_menu_form" action="#" method="post">
<input type="hidden" value="<?php echo $type;?>" name="type" id="type"/>
<input type="hidden" value="<?php echo $menu_id;?>" name="menu_id" id="menu_id"/>
<div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h4 class="modal-title"><?php echo $pageName ?></h4>
            <font style="color:#333;">Please fill in the information below. The field labels marked with * are required input fields.</font>
            </div>
    <div class="col-md-12">
        <div class="errorHandler alert alert-danger no-display">
            <i class="fa fa-times-sign"></i> You have some form errors. Please check below.
        </div>
    </div>              
            <div class="modal-body">
                <div class="row">
                <div class="col-md-12">
                    <div class="col-md-12">
                    <div class="form-group">
                        <h5>
                        <label class="control-label">
							 Code*
						</label></h5>
                            <input type="text" <?php echo (isset($menu_list['menu_code']))?'value="'.$menu_list['menu_code'].'"':null;?> class="form-control" name="menu_code" id="menu_code">
                    </div>
                    <div class="form-group">
                        <h5>
                        <label class="control-label">
							 Name*
						</label></h5>
                            <input type="text" <?php echo (isset($menu_list['menu_name']))?'value="'.$menu_list['menu_name'].'"':null;?> class="form-control" name="menu_name" id="menu_name">
                    </div>
                    
                    <div class="form-group" <?php if (!is_avalable_link($this->session->userdata('ss_group_id'),1)) echo 'style="display:none;"';?>>
                        <h5>
                        <label class="control-label">
							 Tamarind Price*
						</label></h5>
                            <input type="text" <?php echo (isset($menu_list['menu_price_1']))?'value="'.$menu_list['menu_price_1'].'"':null;?> class="form-control" name="menu_price_1" id="menu_price_1">
                    </div>
                    
                    <div class="form-group <?php if (!is_avalable_link($this->session->userdata('ss_group_id'),2)) echo 'style="display:none;"';?>">
                        <h5>
                        <label class="control-label">
							 River House Price*
						</label></h5>
                            <input type="text" <?php echo (isset($menu_list['menu_price_2']))?'value="'.$menu_list['menu_price_2'].'"':null;?> class="form-control" name="menu_price_2" id="menu_price_2">
                    </div>
                                                      
                    </div>
                </div>
            </div>
            <div class="modal-footer">
            <input type="submit" name="add_category" value="<?php echo $btnText; ?>" class="btn btn-primary">
            </div>
            </div> <!--/.col-md-12-->
</form>

<!-- start: JAVASCRIPTS REQUIRED FOR THIS PAGE ONLY VALIDATION-->
<script src="<?php echo asset_url(); ?>js/form-validation-create_menu.js"></script>
<!-- end: JAVASCRIPTS REQUIRED FOR THIS PAGE ONLY  VALIDATION-->

	<script>
        jQuery(document).ready(function() {
            FormValidator.init();
        });
    </script>
    
<script type="text/javascript">
function insertMenuData(){
	
	var type=$('#type').val();

var menu_id=$('#menu_id').val();
var menu_code=$('#menu_code').val();
var menu_name=$('#menu_name').val();
var menu_price_1=$('#menu_price_1').val();

var menu_price_2=$('#menu_price_2').val();
//alert(menu_price_2);
var menu_image=$('#menu_image').val();


					 
	$.post( "<?php echo base_url("menu/save_menu"); ?>", {menu_price_1:menu_price_1, menu_price_2:menu_price_2, type:type, menu_id:menu_id, menu_code:menu_code, menu_name:menu_name,menu_image:menu_image })
	.done(function( data ) {
		
	  var obj = jQuery.parseJSON(data);
	   // alert(obj.type); //last id

	  $('div#ajax-modal').modal('hide');
	  loadGrid();// load location data
	  
	  if(obj.type=='E'){
		  
		   displayNotice('page','Menu has been updated successfully!');
		   location.reload();
	  }
	  if(obj.type=='A'){
		  displayNotice('page','Menu has been added successfully!') ;
		  location.reload(); 
			
	  }
	  
	  })
	    .fail(function() {
    //alert( "error" );
  })
  .always(function() {
    //alert( "finished" );
});
	  
return false;
}
    </script>