<? 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_etemplates/<? echo $vis_language['TXTEMAILTEMPLATES'];?>" onclick="$('#vis_workpanel_div').visExecution('load_module','<? echo $vis_language['TXTEMAILTEMPLATES'];?>',{'vis_module':'setting','vis_operation':'view_etemplates'});" class="link"><? echo $operation['view_title']; ?></a> </li>
         <li class="active"><? echo $vis_language['TXTADDEMAILTEMPLATE'];?></li>
      </ul>
   </div>
</section>
<section class="padder">
   <section class="panel panel-default">
      <header class="panel-heading sub_header"><? echo $vis_language['TXTADDEMAILTEMPLATE']; ?></header>
      <div class="panel-body">
         <form id="vis_email_template_form" name="vis_email_template_form" method="post" class="form-horizontal">
            <div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTTITLE']; ?></label>
               <div class="col-sm-10">
                  <input class="form-control input-sm" type="text"  name="vis_etemplatename" id="vis_etemplatename" value="" >
               </div>
            </div>
            <div class="form-group">
			<label class="col-sm-2 control-label"><? echo $vis_language['TXTLANGUAGE']; ?></label>
			<div class="col-sm-10">
				<select class="form-control input-sm selectpicker" name="vis_language" <? if(count($language_list)>10) echo 'data-live-search="true"';?>> <?
				if($language_list!=-1){
				for($i=0;$i<count($language_list);$i++) { ?>
					<option value="<? echo $language_list[$i]['language_id']; ?>"><? echo $language_list[$i]['language_name']; ?></option><?
				} } else { ?><option value="1"><? echo "Default english"; ?></option><? } ?> </select>
			</div>
		</div> 
		<div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTDISPLAYORDER']; ?></label>
               <div class="col-sm-10">
                  <input class="form-control input-sm" type="text" name="vis_displayorder" id="vis_displayorder" value="0" >
               </div>
        </div>
            <div class="form-group">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTSUBJECT']; ?></label>
               <div class="col-sm-10">
                  <input class="form-control input-sm" type="text" name="vis_subject" id="vis_subject" value="">
               </div>
            </div>
            <div class="form-group">
         <label class="col-sm-2 control-label"><? echo $vis_language['TXTCONTENT']; ?></label>
         <div class="col-sm-10">
              <textarea name="vis_etemplate_content" id="vis_etemplate_content" class="form-control"></textarea>
         </div>
         <div class="form-group">
         <label class="col-sm-2 control-label"><? echo $vis_language['TXTATTACHMENT']; ?></label>
         <div class="col-sm-10">
                  <div class="radio i-checks m-r-lg pull-left">
				  <label>
                  <input type="radio" checked="checked" value="1"  name="vis_attachment_setting"><i></i>
                  <? echo $vis_language['TXTYES']; ?></label></div>
                  <div class="radio i-checks pull-left">
				  <label>
                  <input type="radio" value="0"  name="vis_attachment_setting"><i></i>
                  <? echo $vis_language['TXTNO']; ?> </label></div>
         </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"  name="vis_status"  id="vis_status" 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':'add_etemplate', 'vis_form':'vis_email_template_form'})"><? echo $vis_language['TXTADD']; ?></button>
               </div>
            </div>
      </div>
      </form>
      </div>
   </section>
</section>
<script>
<? if (!defined('VIS_HTML_EDITOR') || VIS_HTML_EDITOR == 1) { ?>
 $(function(){
		$('#vis_etemplate_content').redactor({
			minHeight: 180, // pixels
			maxHeight: 180,
			imageUpload: "index.php?vis_tmpst="+new Date().getTime()+"&vis_module=ticket&vis_operation=upload_file&vis_static_area=editor_image_upload",         
			imageUploadParam: 'files',
			plugins: ['source'],
			deniedTags: ['html', 'head', 'link', 'body', 'meta', 'script','applet']
		});
	});
 <? } ?>
</script>
<script src="<?= VIS_PATH_SCRIPT; ?>file-input/bootstrap-filestyle.min.js"></script>
