<? 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 $module_details['module_name']; ?></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 href="#/setting/view_modules/<? echo $vis_language['TXTMODULE']; ?>" onclick="$('#vis_workpanel_div').visExecution('load_module','<? echo $vis_language['TXTMODULE']; ?>',{'vis_module':'setting','vis_operation':'view_modules'});" class="link"><? echo $operation['view_title']; ?></a></li>
         <li class="active"> <? echo $vis_language['TXTUPDATEMODULE']; ?></li>
      </ul>
      <div>
      </div>
   </div>
</section>
<section class="padder">
   <section class="panel panel-default">
      <header class=" panel-heading sub_header"><? echo $vis_language['TXTUPDATEMODULE']; ?></header>
      <div class="panel-body">
            <div>
               <? include_once(VIS_PATH_TEMPLATE.'module_details.php'); ?>
			   <div id="vis_module_details_list_<? echo $module_details['module_id']; ?>" >
			   </div>
			   <div id="update_div">
			   </div>
		    </div>
         </div>
   </section>
</section>
<script>
	view_preferences();
   function view_preferences() {
       $.ajax({
           url: 'index.php',
           data: { 'vis_module': "setting", 'vis_operation': "module_setting",  'vis_module_id': '<? echo $module_details['module_id']; ?>' },
           type: "POST",
           success: function(data) { 
		   	if(data== -1 ){
			  var abc = "'<? echo ($module_details['module_id']==11 || $module_details['module_id']==12)?'update_setting':'update_module';?>'";
			 $("#update_div").html('<? if($module_details['module_id']>3) { ?><div class="form-group"><label class="col-sm-2 control-label"><? echo $vis_language['TXTSTATUS']; ?></label><div class="col-sm-1"><label class="switch  <? if($module_details['is_enabled']==0) echo 'radio-no-uncheck'; ?>"><input type="checkbox" name="vis_status"  id="vis_status" <? if($module_details['is_enabled']==1) echo 'checked="checked"'; ?> ><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'"+':'+abc+','+"'vis_form'"+':'+"'vis_module_form'"+'})"><? echo $vis_language['TXTUPDATE']; ?></button></div></div></form>');
			}
			else
               $("#vis_module_details_list_<? echo $module_details['module_id']; ?>").html(data);
           }
       });
   }
</script>
