<? 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']; ?>"><? echo $vis_language['TXTSETTINGS']; ?></a></li>
         <li><a  class="link" href="#/setting/view_vendor/<? echo $vis_language['TXTVENDOR']; ?>" class="link"><? echo $operation['view_title']; ?></a> </li>
         <li class="active"><?echo $vis_language['TXTUPDATEVENDOR'];?></li>
      </ul>
   </div>
</section>

<section class="row m-b m-l-none m-r-none b-t b-light">
   <div class="col-md-6">
    	<? include(VIS_PATH_TEMPLATE.'vendor_detail_summary.php');?>
   </div>
   <div class="col-md-6">
      <div class="wrapper">
        <div class="row m-b-sm">
             <span class="col-xs-3 text-right font-bold "><? echo $vis_language['TXTDESCRIPTION']?>:</span>
            <div class=" col-xs-9 text-lt text-muted"><? echo $vendor_details['description']; ?></div>
        </div>
      </div>
      <div class="row m-b-sm">
           <span class="col-xs-3 text-right font-bold "><? echo $vis_language['TXTSTATUS']?>:</span>
          <div class=" col-xs-9 text-lt text-muted">
		 <? if($vendor_details['is_enabled']==1){ $status = $vis_language['TXTENABLED'];$lbl='vh-green-bg';} else {$status = $vis_language['TXTDISABLED'];$lbl='label-default';}?>
         <span class="label <? echo $lbl?>"><? echo $status;?></span>
          </div>
      </div>
   </div>
</section>
<section class="padder">
    <section class="panel panel-default">
		    <form class="form-horizontal" role="form" id="vis_child_client_form" name="vis_child_client_form" method="post">
        <header class="panel-heading text-right bg-light clearfix">
            <ul class="nav nav-tabs pull-left"  id="tabs">
                 <li id="product" class="active"><a data-toggle="tab" oncontextmenu="return false;" href="#vis_details_list" onclick="$('#vis_details_list').visExecution('load_operations',{'vis_module':'setting', 'vis_operation':'get_ciproduct_list', 'vis_action':'details',  'vis_departmentacc':'<? echo $vendor_details['department_access'];?>', 'vis_vendor_id':<? echo $vendor_details['vendor_id']; ?>});set_active_tab('product');"><? echo $vis_language['TXTPRODUCT']; ?></a></li>
                <li  id="profile"><a data-toggle="tab" oncontextmenu="return false;" onclick="$('#vis_details_list').visExecution('load_operations',{'vis_module':'setting', 'vis_operation':'vendor_details', 'vis_action':'details', 'vis_tab_profile':'true', 'vis_vendor_id':<? echo $vendor_details['vendor_id']; ?>});set_active_tab('profile');" href="#vis_details_list" ><? echo $vis_language['TXTPROFILE']; ?></a></li>
               <!-- <li id="contact"><a data-toggle="tab"   href="#vis_details_list" onclick="$('#vis_details_list').visExecution('load_operations',{'vis_module':'client', 'vis_operation':'get_subaccounts', 'vis_client_id':<? echo $client_details['client_id']; ?>,'vis_contact':1});set_active_tab('contact');"><? echo$vis_language['TXTCONTACTS']; ?></a></li>
                <li id="ticket"><a data-toggle="tab"   href="#vis_details_list" onclick="$('#vis_details_list').visExecution('load_operations',{'vis_module':'ticket', 'vis_operation':'get_details', 'vis_action':'history', 'vis_client_id':<? echo $client_details['client_id']; ?>,'vis_ticket':1});set_active_tab('ticket');"><? echo $vis_language['TXTTICKETS']; ?></a></li>-->
            </ul>
           <!-- <span class="hidden-sm dropdown">
                              <a data-toggle="dropdown" href="#action">--><i class="fa"></i> <!--<b class="caret"></b></a>-->
                              <!--<ul class="dropdown-menu dropdown-menu-right text-left">
                                <li><a href="javascript:void(0)" data-toggle="ajaxModal" data-modal-arguments="vis_module=client&vis_operation=get_merge_clients&vis_static_area=vis_client_merge_area&vis_client_id=<? echo $client_details['client_id']; ?>&vis_domain_id=<? echo $client_details['domain_id']; ?>"><? echo $vis_language['TKTMRGCLIENT']; ?></a></li>
                                <li><a href="javascript:void(0)" data-toggle="ajaxModal" data-modal-arguments="vis_module=client&vis_operation=get_merge_contact&vis_static_area=vis_client_merge_area&vis_client_id=<? echo $client_details['client_id']; ?>&vis_domain_id=<? echo $client_details['domain_id']; ?>"><? echo $vis_language['TKTMRGCONTACT']; ?></a></li>
                              </ul>-->
           <!-- </span>-->
        </header>
        </form>
        <div class="panel-body">
			<div class="tab-content">
				<div id="vis_details_list" class="tab-pane active">

					<script>$('#vis_details_list').visExecution('load_operations',{'vis_module':'setting', 'vis_operation':'get_ciproduct_list', 'vis_action':'details', 'vis_vendor_id':'<? echo $vendor_details['vendor_id']; ?>','vis_departmentacc':'<? echo $vendor_details['department_access'];?>', 'vis_vendor_name':'<? echo $vendor_details['name']; ?>','vis_section_area':'<?= $operation['vis_section_area'];?>'});</script>
				</div>
			</div>
			</div>
	</section>
</section>

<script type="text/javascript">
   function toggle_dept_list(){
       if($('#vis_department_all').is(":checked")) $('#vis_dept_list_section').hide();
       else $('#vis_dept_list_section').show();
	   $('.dept_access_list').each(function(index) {
        $(this).find('input[type="checkbox"]').removeAttr('checked');
       });
   }
   function set_active_tab(tab_id){
        var active = $("#tabs .active").attr("id");
        $("#"+active).removeClass("active");
        $("#"+tab_id).addClass("active").show();
        var parent_div = $("#vis_details_list").parent().parent();
        if($("#vis_child_client_form #tabs #contact.active").length
        || $("#vis_child_client_form #tabs #ticket.active").length
        || $("#vis_child_client_form #tabs #order.active").length || $("#vis_child_client_form #tabs #product.active").length || $("#vis_child_client_form #tabs #invoice.active").length || $("#vis_child_client_form #tabs #transaction.active").length)
            parent_div.addClass("p-l-none").addClass("p-r-none");
        else parent_div.removeClass("p-l-none").removeClass("p-r-none");
    }
</script>