<? global $vis_language;?>

<div class="form-group">
	<label class="col-sm-2 control-label"><? echo $vis_language['TXTTITLE']; ?></label>
	<div class="col-sm-10">
		<input type="text" class="form-control input-sm" name="vis_app_title" id="vis_app_title" value="<? echo $aircall_details['db_name']; ?>" />
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label"><? echo $vis_language['TXTAPIID']; ?></label>
	<div class="col-sm-10">
		<input type="text" class="form-control input-sm" name="vis_account_sid" id="vis_account_sid" value="<? echo $aircall_details['host_name']; ?>" />
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label"><? echo $vis_language['TXTAPITOKEN']; ?></label>
	<div class="col-sm-10">
		 <input type="text" class="form-control input-sm" name="vis_auth_token" id="vis_auth_token" value="<? echo $aircall_details['user_name']; ?>" />
	</div>
</div>

<div class="form-group" style="display:none">
               <label class="col-sm-2 control-label"><? echo $vis_language['TXTAUTOTICKETECREATION']; ?></label>
               <div class="col-sm-10">
                  <div class="radio i-checks m-r-lg pull-left "><label>
                  <input type="radio" value="1"  id="vis_app_sid_y" name="vis_app_sid" <?php if($aircall_details['db_password']==1){ echo 'checked="checked"'; } ?>><i></i>
                  Yes</label></div>
                  <div class="radio i-checks m-r-lg pull-left "><label>
                  <input type="radio" value="0" id="vis_app_sid_n" name="vis_app_sid" <?php if($aircall_details['db_password']!=1){ echo 'checked="checked"'; } ?> ><i></i>
                  No  </label></div>
               </div>
            </div>
			
<div class="form-group">
	<label class="col-sm-2 control-label"><? echo $vis_language['TXTSCRIPT']; ?></label>
	<div class="col-sm-10">
		 <textarea class="form-control input-sm" name="vis_script" id="vis_script" ><? echo ($aircall_details['billing_url']); ?></textarea>
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label" ><? echo $vis_language['TXTSTATUS']; ?></label>
	<div class="col-sm-10">
		<label class="switch"  value="1"<? if($aircall_details['is_enabled']!=1) echo 'radio-no-uncheck'; ?>  >
		<input type="checkbox"  name="vis_status_aircall"  id="vis_status_aircall" value="1" <? if($aircall_details['is_enabled']==1 || !isset($aircall_details['is_enabled'])) echo ' checked="checked"'; ?> > 
		<span></span>
		</label>
	</div>
</div>



<input type="hidden" name="vis_integration_id"  id="vis_integration_id" value="<? echo $aircall_details['integration_id']; ?>"/>
<input type="hidden" name="vis_integration_type"  id="vis_integration_type" value="50"/>

<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_aircall_setting', 'vis_form':'vis_integration_form'})"><? echo $vis_language['TXTSAVE']; ?></button>
             <? if($aircall_details !=-1 && !empty($aircall_details)) {?>          
            <button type="button" class="btn btn-primary m-l" onclick="$('#vis_workpanel_div').visExecution('submit_form',{'vis_module':'setting', 'vis_operation':'delete_twilio_setting', 'vis_form':'vis_integration_form','vis_integration_type':50})"><? echo $vis_language['TXTDELETE']; ?></button>
             <? } ?>
		</div>
		
	</div>
</form>

