<? global $vis_language;?>
<form class="form-horizontal" id="vis_domain_form" name="vis_domain_form" method="post" >
   <input type="hidden" name="vis_domain_id" value="<? echo $domain_details['domain_id']; ?>" />
   <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_domainname" id="vis_domainname" value="<? echo  htmlentities($domain_details['domain_name'], ENT_COMPAT, 'UTF-8'); ?>">
      </div>
   </div>
   <div class="form-group">
      <label class="col-sm-2 control-label"><? echo $vis_language['TXTDOMAIN']; ?><br /> e.g. support.domain.com</label>
      <div class="col-sm-10">
         <input class="form-control input-sm" type="text" name="vis_domain" id="vis_domain" value="<? echo $domain_details['domain']; ?>">
      </div>
   </div>
   <div class="form-group">
      <label class="col-sm-2 control-label"><? echo $vis_language['TXTSUPPORTPORTALURL']; ?></label>
      <div class="col-sm-10">
         <input class="form-control input-sm" type="text" name="vis_domainurl" id="vis_domainurl" value="<? echo $domain_details['domain_url']; ?>" >
      </div>
   </div>
   <div class="form-group">
      <label class="col-sm-2 control-label"><? echo $vis_language['TXTDEFAULTEMAIL']; ?></label>
      <div class="col-sm-10">
         <input class="form-control input-sm" type="text" name="vis_domainemail" id="vis_domainemail" value="<? echo $domain_details['default_email']; ?>">
      </div>
   </div>
   <div class="form-group">
      <label class="col-sm-2 control-label"><? echo $vis_language['TXTCOMPANYADDRESS']; ?></label>
      <div class="col-sm-10">
         <textarea class="form-control input-sm" name="vis_details" id="vis_details"><? echo $domain_details['description']; ?></textarea>
      </div>
   </div>
   <div class="form-group">
      <label class="col-sm-2 control-label"><? echo $vis_language['TXTDEFAULTLANGUAGE']; ?></label>
      <div class="col-sm-10">
         <select name="vis_language" id="vis_language" class="form-control input-sm selectpicker" <? if(count($language_details)>10) echo 'data-live-search="true"';?>><?
            for($i=0;$i<count($language_details); $i++) echo '<option value="'.$language_details[$i]['language_id'].'"'.(($domain_details['language_id']==$language_details[$i]['language_id'])?' selected="selected"':'').'>'.$language_details[$i]['language_name'].'</option>'; ?>
         </select>
      </div>
   </div>
   <div class="form-group">
      <label class="col-sm-2 control-label"><? echo $vis_language['TXTOUTGOINGEMAIL']; ?></label>
      <div class="col-sm-10">
         <select name="vis_mailtype" id="vis_mailtype" class="form-control input-sm selectpicker" <? if(count($smtp_details)>10) echo 'data-live-search="true"';?>>
          <option value="0">PHP mail</option>
            <? 
               if($smtp_details[0] != '') {
                   for($i=0;$i<count($smtp_details); $i++) echo '<option value="'.$smtp_details[$i]['smtp_id'].'"'.(($domain_details['send_mail']==$smtp_details[$i]['smtp_id'])?' selected="selected"':'').'>'.$smtp_details[$i]['smtp_host'].'-'.$smtp_details[$i]['smtp_user'].'</option>';
               } ?>
         </select>
      </div>
   </div>
   <div class="form-group">
      <label class="col-sm-2 control-label"><? echo $vis_language['TXTCURRENCY']; ?></label>
      <div class="col-sm-10">
         <select name="vis_currency" id="vis_currency" class="form-control input-sm selectpicker" data-live-search="true">
            <option value="USD">U.S. Dollar</option>
            <option value="AUD">Australian Dollar</option>
            <option value="BRL">Brazilian Real</option>
            <option value="CAD">Canadian Dollar</option>
            <option value="CZK">Czech Koruna</option>
            <option value="DKK">Danish Krone</option>
            <option value="EUR">Euro</option>
            <option value="HKD">Hong Kong Dollar</option>
            <option value="HUF">Hungarian Forint</option>
			<option value="INR">Indian Rupee</option>
            <option value="IDR">Indonesian Rupiah</option>
            <option value="ILS">Israeli New Sheqel</option>
            <option value="JPY">Japanese Yen</option>
            <option value="MYR">Malaysian Ringgit</option>
            <option value="MXN">Mexican Peso</option>
            <option value="NOK">Norwegian Krone</option>
            <option value="NZD">New Zealand Dollar</option>
            <option value="PHP">Philippine Peso</option>
            <option value="PLN">Polish Zloty</option>
            <option value="GBP">Pound Sterling</option>
            <option value="SGD">Singapore Dollar</option>
			<option value="ZAR">South African Rand</option>
            <option value="SEK">Swedish Krona</option>
            <option value="CHF">Swiss Franc</option>
            <option value="TWD">Taiwan New Dollar</option>
            <option value="THB">Thai Baht</option>
            <option value="TRY">Turkish Lira</option>
         </select>
      </div>
   </div>   
   <div class="form-group">
      <label class="col-sm-2 control-label"><? echo 'BCC email'; ?></label>
      <div class="col-sm-10">
         <input class="form-control input-sm" type="text" name="vis_bcc_email" id="vis_bcc_email" value="<? echo $domain_details['bcc_email'];?>">
      </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="<? echo $domain_details['display_order'];?>">
      </div>
   </div>
	<? if($domain_details['domain_id'] != 1) {?>
   <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($domain_details['is_enabled']==0) echo 'radio-no-uncheck'; ?>  ">
         <input type="checkbox"  name="vis_status"  id="vis_status" <? if($domain_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_domain', 'vis_form':'vis_domain_form'})"><? echo $vis_language['TXTUPDATE']; ?></button>
      </div>
   </div>
</form>
<script>
   $("#vis_currency").val("<? echo $domain_details['currency']; ?>");
   $(".selectpicker").selectpicker();
</script>
