<? global $vis_language; ?>
<section id="breadcrumb" class="row m-b m-l-none m-r-none">
   <div class="col-sm-6">
      <h3 class="m-b-xs text-black"><? echo $operation['view_title'];?></h3>
      <ul class="breadcrumb bg-empty no-border m-b-xxs no-padder">
         <li><a class="link" href="#/home/quick_view/<? echo $vis_language['TXTHOME']; ?>"><? echo $vis_language['TXTHOME']; ?></a></li>
         <li><a class="link" href="#/setting/setting_menu/<? echo $vis_language['TXTSETTINGS'];?>" onclick="$('#vis_workpanel_div').visExecution('load_module','<? echo $vis_language['TXTSETTINGS']; ?>',{'vis_module':'setting','vis_operation':'setting_menu'});"><? echo $vis_language['TXTSETTINGS']; ?></a></li>
         <li><a class="link" href="#/setting/view_service_category/<? echo $vis_language['TXTSERVICECATEGORY']; ?>" onclick="$('#vis_workpanel_div').visExecution('load_module','<? echo $vis_language['TXTSERVICECATEGORY']; ?>',{'vis_module':'setting','vis_operation':'view_service_category'});" class="link"><? echo $operation['view_title']; ?></a> </li>
         <li class="active"><? echo $vis_language['TXTADDSERVICECATEGORY'];?></li>
      </ul>
   </div>
</section>
<section class="padder">
   <section class="panel panel-default">
      <header class="panel-heading sub_header"><? echo $vis_language['TXTADDSERVICECATEGORY']; ?></header>
      <div class="panel-body">
         <form class="form-horizontal" id="vis_service_category_form" name="vis_service_category_form" method="post" >
            <div class="form-group">
				    <label class="col-sm-2 control-label"><?= $vis_language['TXTDOMAINACCESS']; ?></label>
                 <div class='col-sm-10'>
                    <label class="checkbox-inline i-checks col-sm-2">
                    <input type="checkbox" value="0,0" id="vis_department_id" name="vis_department_id"  checked="checked" onChange="toggle_dept_list();"><i></i> <? echo $vis_language['TXTALLDOMAINS']; ?>
                    </label>
					<div class='col-sm-2' id="vis_department_list" style="display:none;">
						<select class='form-control input-sm selectpicker' name="vis_department_id" id="vis_department_id" <? if(count($domain_details) > 10) echo 'data-live-search="true"' ?>>
							<!--<option value="0">-- <? //echo $vis_language['TXTSELECTDEPARTMENT']; ?> --</option>-->
							<? for($i=0;$i<count($domain_details);$i++){
								 echo '<option value="'.$domain_details[$i]['domain_id'].'">'.$domain_details[$i]['domain_name'].'</option>';
							} /*for($i=0;$i<count($department_details);$i++){
								 echo '<option value="'.$department_details[$i]['department_id'].','.$department_details[$i]['domain_id'].'">'.$department_details[$i]['domain_name'].'</option>';
							}*/?>
						</select>
					</div>
                 </div>
			</div>
            <div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTNAME']; ?></label>
               <div class="col-sm-10">
                  <input class="form-control input-sm" type="text" name="vis_name" id="vis_name">
               </div>
            </div>
            <div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTDESCRIPTION']; ?></label>
               <div class="col-sm-10">
                  <textarea class="form-control input-sm" type="text" name="vis_description" id="vis_description"  ></textarea>
               </div>
            </div>
            <div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTSTATUS']; ?></label>
               <div class="col-sm-1">
                  <label class="switch">
                  <input type="checkbox" checked="checked" value="1" name="vis_status"  id="vis_status" >
                  <span ></span>
                  </label>
               </div>
            </div>
            <div class="line b-b line-lg pull-in"></div>
            <br/>
            <div class="form-group">
               <div class="col-sm-4 col-sm-offset-2">
                  <button type="button" class="btn btn-primary" onclick="$('#vis_workpanel_div').visExecution('submit_form',{'vis_module':'setting', 'vis_operation':'add_new_service_category', 'vis_form':'vis_service_category_form'})"><? echo $vis_language['TXTADD']; ?></button>
               </div>
            </div>
      </form>
      </div>
   </section>
</section>
<script type="application/javascript">
$(".selectpicker").selectpicker();
   function toggle_dept_list(){
       if($('#vis_department_id').is(":checked")){ $('#vis_department_list').hide();
							}else{ $('#vis_department_list').show();
							$('.dept_access_list').each(function(index) {
        $(this).find('input[type="checkbox"]').removeAttr('checked');
       });
							}
   }
</script>