<form id="entry-content" method="post" action="<?= $setting_type=='price'?'setting/save_price':'';?>" class="frm-save" style="display: none;">
	<div class="panel panel-default">
		<div class="panel-body">
			<?php if($setting_type =='vehicle_type' || $setting_type =='material_type'){ ?>			
				<div class="col-md-6">
					<span class="badge-label"><?php echo ucfirst($setting_type_str);?> Name<span class="redstar">*</span></span>
					<input class="form-control mb25 name" name="name">
				</div>
      <?php } elseif($setting_type =='user-group'){ ?>
        <div class="col-md-6">
          <span class="badge-label"><?php echo ucfirst($setting_type_str);?> Name<span class="redstar">*</span></span>
          <input class="form-control mb25 name" name="name">
        </div>
        <div class="col-md-6">
          <table style="width: 100%" class="table-perm">
            <tr>
              <th>Permissions</th>
              <th>Create</th>
              <th>View</th>
              <th>Edit</th>
              <th>Delete</th>
            </tr>
            <?php 

            $order=array();
            $order[] = array('name'=>'sort_order','value'=>'asc');    
            $res = $this->setting_model->get_setting('permission',false,$order);
            if(!empty($res)){ 
              foreach ($res as $res1) { ?>
                <tr>
                  <td><?php echo $res1['name']; ?></td>
                  <td>
                   <input type="checkbox" class="perm_opt" name="permissions[<?=$res1['permission_id']?>][add]" value="1">
                 </td>
                 <td>
                  <input type="checkbox" class="perm_opt" name="permissions[<?=$res1['permission_id']?>][view]" value="1">
                </td>
                <td>
                  <input type="checkbox" class="perm_opt" name="permissions[<?=$res1['permission_id']?>][edit]" value="1">
                </td>
                <td>
                  <input type="checkbox" class="perm_opt" name="permissions[<?=$res1['permission_id']?>][del]" value="1">
                </td>
              </tr>
            <?php }
          }
          ?>  
        </table>    
      </div>
    <?php } elseif($setting_type =='division'){ ?>
      <div class="col-md-6">
       <span class="badge-label"><?php echo ucfirst($setting_type_str);?> Name<span class="redstar">*</span></span>
       <textarea style="height:108px !important;" name="name" class="form-control name" placeholder="Divisions (Seperate by comma)"></textarea>
     </div>  
     <div class="col-md-4">
       <span class="badge-label">Zone<span class="redstar">*</span></span>
       <select class="select form-control zone_id" name="zone_id">
        <option value="0" >Select</option>
        <?php  
        $order=array();
        $order[] = array('name'=>'name','value'=>'asc');				
        $res = $this->setting_model->get_setting('zone',false,$order);
        if( count($res) > 0){
         foreach($res as $res1){ ?>
          <option value="<?= $res1["zone_id"] ?>" ><?= $res1["name"] ?> </option>
        <?php }  ?>
      <?php }  ?>
    </select>
  </div>				 
  <div class="clearfix"></div>
<?php } elseif($setting_type =='price'){ ?> 
  <div class="row"> 
    <div class="col-md-6">
     <span class="badge-label">Vehicle Type<span class="redstar">*</span></span>
     <select class="select form-control vehicle_type_id" name="vehicle_type_id">
      <option value="0" >Select</option>
      <?php  
      $order=array();
      $order[] = array('name'=>'name','value'=>'asc');        
      $res = $this->setting_model->get_setting('vehicle_type',false,$order);
      if( count($res) > 0){
       foreach($res as $res1){ ?>
        <option value="<?= $res1["vehicle_type_id"] ?>" ><?= $res1["name"] ?> </option>
      <?php }  ?>
    <?php }  ?>
  </select>
</div>     
</div>  <br> 
<div id="dtl_cont"> 
  <div class="row">  
    <div class="col-md-2">
     <span class="badge-label">Weight From<span class="redstar">*</span></span>
     <input class="form-control num-frac-only mb25 fr_wt" name="fr_wt[]">
   </div>    
   <div class="col-md-2">
    <span class="badge-label">Weight To<span class="redstar">*</span></span>
    <input class="form-control num-frac-only mb25 to_wt" name="to_wt[]">
  </div> 
  <div class="col-md-2">
   <span class="badge-label">Price<span class="redstar">*</span></span>
   <input class="form-control num-frac-only mb25 price" name="price[]">
 </div>  
 <div class="col-lg-1" style="width:40px;padding-top: 35px;">
  <button type="button" id="btn_plus" class="btn btn-primary btn-plus">+</button>
</div>  
</div>  
</div>
<div class="clearfix"></div>   				 
<?php } elseif($setting_type =='user'){ ?>
  <style type="text/css">
   .top-alt{
    margin-top: 115px !important;
  }
</style>
<div class="col-md-3">
 <span class="badge-label">Login Name<span class="redstar">*</span></span>
 <input class="form-control mb25 name" name="name">
</div>  
<div class="col-md-3">
 <span class="badge-label">Full Name</span>
 <input class="form-control mb25 full_name" name="full_name">
</div>
<div class="col-md-3">
 <span class="badge-label">Mobile</span>
 <input class="form-control mb25 mobile" name="mobile">
</div>       
<div class="col-md-3">
 <span class="badge-label">Password</span>
 <input class="form-control mb25 password" name="password">
</div>   
<div class="clearfix"></div>    
<div class="col-md-3 top15">
 <span class="badge-label">User Group</span>
 <select class="select form-control user_group_id" name="user_group_id">
  <option value="0" >Select</option>
  <?php  
  $order=array();
  $order[] = array('name'=>'name','value'=>'asc');				
  $res = $this->setting_model->get_setting('user_group',false,$order);
  if( count($res) > 0){
   foreach($res as $res1){ ?>
    <option value="<?= $res1["user_group_id"] ?>" ><?= $res1["name"] ?> </option>
  <?php }  ?>
<?php }  ?>
</select>
</div>


<?php } elseif($setting_type =='sms'){ ?>     
  <div class="col-md-12">
    <span class="badge-label">URL<span class="redstar">*</span></span>
    <input class="form-control mb25 url" name="url">
  </div>
  <div style="margin-top:10px;" class="col-md-12">
    <span class="badge-label">API Key<span class="redstar">*</span></span>
    <input class="form-control mb25 api_key" name="api_key">
  </div>
  <div style="margin-top:10px;" class="col-md-12">
    <span class="badge-label">Client ID<span class="redstar">*</span></span>
    <input class="form-control mb25 client_id" name="client_id">
  </div>
  <div style="margin-top:10px;" class="col-md-12">
    <span class="badge-label">Sender ID<span class="redstar">*</span></span>
    <input class="form-control mb25 sender_id" name="sender_id" value="">
  </div>
<?php } ?>      
<div class="col-md-3 top15">
  <span class="badge-label p-2">Status</span>
  <div class="switch top10">
   <label>Inactive<input type="checkbox" checked="true" name="status" value="1" >
    <span class="lever"></span> Active
  </label>
</div>
</div>
<div class="<?=($setting_type =='price' || $setting_type =='sms')?'col-md-6':'col-md-3';?> pull-right top40 text-right top-alt">
  <label id="err_lbl" class="err_lbl"></label>&nbsp;&nbsp;
  <button class="btn button-save btn-save" title="Save" type="button"><i class="fa fa-check" aria-hidden="true"></i> Add</button>
  <button type="reset" title="Cancel" class="btn btn-clr button-cancel"><i class="fa fa-times" aria-hidden="true"></i> Clear</button>
</div>
</div>
</div>
</form>