<? global $vis_language; ?>
<div class="form-group">
   <label class="col-sm-2 control-label">Apply to all deparments</label>
   <div class="col-sm-10">
      <label class="checkbox-inline i-checks">
      <input type="checkbox" name="vis_smtp_all_dept" id="vis_smtp_all_dept" value="1" ><i></i>
      </label>
   </div>
</div>
<div class="form-group">
   <label class="col-sm-2 control-label"><? echo $vis_language['TXTHOSTNAME']; ?></label>
   <div class="col-sm-10">
      <input class="form-control input-sm" type="text"  name="vis_host" id="vis_host" value="<? echo $smtp_details['smtp_host']; ?>">
   </div>
</div>
<div class="form-group">
   <label class="col-sm-2 control-label"><? echo $vis_language['TXTPORT']; ?></label>
   <div class="col-sm-10">
      <input class="form-control input-sm" type="text" name="vis_port" id="vis_port" value="<? echo $smtp_details['smtp_port']; ?>">
   </div>
</div>
<div class="form-group">
   <label class="col-sm-2 control-label"><? echo $vis_language['TXTUSERNAME']; ?></label>
   <div class="col-sm-10">
      <input class="form-control input-sm" type="text" name="vis_username" id="vis_username" value="<? echo $smtp_details['smtp_user']; ?>">
   </div>
</div>
<div class="form-group">
   <label class="col-sm-2 control-label"><? echo $vis_language['TXTPASSWORD']; ?></label>
   <div class="col-sm-10">
      <input class="form-control input-sm" type="password" name="vis_password" id="vis_password" value="<? echo password_decrypt($smtp_details['smtp_password'],VIS_PASSWORD_KEY); ?>" >
   </div>
</div>
<div class="form-group">
   <label class="col-sm-2 text-muted text-right"><? echo $vis_language['TXTSSL']; ?></label>
   <div class="col-sm-10">
      <label class="radio i-checks m-r-lg pull-left p-d-sm">
      <input type="radio" name="vis_ssl" id="vis_ssl1" value="0" <? if($smtp_details['smtp_ssl']==0) echo ' checked="checked"'; ?>/><i></i>
      <? echo $vis_language['TXTNONE']; ?></label>
      <label class="radio i-checks m-r-lg pull-left p-d-sm">
      <input type="radio" name="vis_ssl" id="vis_ssl2" value="1" <? if($smtp_details['smtp_ssl']==1) echo ' checked="checked"'; ?>/><i></i>
      SSL
      </label>
      <label class="radio i-checks m-r-lg pull-left p-d-sm">
      <input type="radio" name="vis_ssl" id="vis_ssl3" value="2" <? if($smtp_details['smtp_ssl']==2) echo ' checked="checked"'; ?>/><i></i>
      TLS
      </label>
   </div>
</div>
<div class="form-group">
   <label class="col-sm-2 text-muted text-right"><? echo $vis_language['TXTSMTPAUTHENTICATION']; ?></label>
   <div class="col-sm-10">
      <label class="checkbox i-checks m-r-lg pull-left p-d-sm">
      <input type="checkbox" name="vis_smtp_auth"<? if($smtp_details['authentication']==1) echo ' checked="checked"'; ?> id="vis_smtp_auth" value="1"/><i></i></label>
   </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  <? if($smtp_details['is_enabled']==0) echo 'radio-no-uncheck'; ?>  ">
      <input type="checkbox"  name="vis_status"  id="vis_status" <? if($smtp_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':'update_smtp', 'vis_form':'vis_smtp_form'})"><? echo $vis_language['TXTUPDATE']; ?></button>
   </div>
</div>
</div>
