		<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_customer_form" action="#" method="post">
<input type="hidden" value="<?php echo $type;?>" name="type" id="type"/>

<form role="form" class="form-horizontal" id="create_customer_form" action="#">

<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="modal-body">
            <div id="error"></div>
                <div class="row">
                <div class="col-md-12">
                    <div class="col-md-5">
                    <div class="form-group">
                        <h5>Broker Code</h5>
                            <input type="hidden" class="form-control" name="broker_id" id="broker_id" value="<?php echo $details['broker_id']; ?>" readonly>
                            <input type="text" class="form-control" name="broker_code" id="broker_code" value="<?php echo $details['broker_code']; ?>" readonly>
                        </div>
                        
                        <div class="form-group">
                        <h5>Broker Name</h5>
                            <input type="text" class="form-control" name="broker_name" id="broker_name" value="<?php echo $details['broker_name']; ?>">
                        </div>
                        
                        <div class="form-group">
                        <h5>Broker Address</h5>
                            <input type="text" class="form-control" name="broker_address" id="broker_address" value="<?php echo $details['broker_address']; ?>">
                        </div>
                        
                         <div class="form-group">
                        <h5>Broker Contact</h5>
                            <input type="text" class="form-control" name="broker_contact_no" id="broker_contact_no" value="<?php echo $details['broker_contact_no']; ?>">
                        </div>
                    </div>
                    <div class="col-md-5 pull-right">
                      
                    </div>
                </div>
                
                </div> <!--col-md-12-->
            </div>
            <div class="modal-footer">
            <input type="submit" name="add_category" value="<?php echo $btnText; ?>" class="btn btn-primary">
            </div>
</form>
		<!-- start: JAVASCRIPTS REQUIRED FOR THIS PAGE ONLY VALIDATION -->
		<script src="<?php echo asset_url(); ?>js/form-validation-create_customer.js"></script>
		<!-- end: JAVASCRIPTS REQUIRED FOR THIS PAGE ONLY  VALIDATION-->
                        
		<script>
			jQuery(document).ready(function() {
				FormValidator.init();
				//$(".search-select").select2();
				//$('#route_id').select2();
			//	$('#country_id').select2();
			});
		</script>
        
<script type="text/javascript">
function insertCustomerData(){
var type=$('#type').val();
var broker_id=$('#broker_id').val();
var broker_code=$('#broker_code').val();
var broker_name=$('#broker_name').val();	
var batch_code=$('#batch_code').val();
var broker_address=$('#broker_address').val();
var broker_contact_no=$('#broker_contact_no').val();
	$.post( "<?php echo base_url('broker/save_update_broker'); ?>", {type:type,broker_code:broker_code,broker_name:broker_name,broker_address:broker_address,broker_contact_no:broker_contact_no,broker_id:broker_id})
	  .done(function( data ) {
	  var obj = jQuery.parseJSON(data);
	 if (obj.status==0) 
	{
		$('div#error').html('<div class="alert alert-block alert-danger fade in"><button type="button" class="close" data-dismiss="alert">×</button><h4 class="alert-heading"><i class="fa fa-times-circle"></i> Error!</h4>'+obj.validation+'</div>');
		$('body').modalmanager('removeLoading');
		$('body').attr('class','');
	} else {
	   //loadGrid();
	  /**/
	  $('div#ajax-modal').modal('hide');
	  // load customer data
	  if(obj.type=='E'){
		 displayNotice('page','Batch has been updated successfully!');
		  location.reload(true);
	  }
	  if(obj.type=='A'){
		displayNotice('page','Batch has been added successfully!')  ;
		  location.reload(true);
	  }		
	}
	  

	  });
return false;
}
    </script>