<? 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 $exotel_details['db_name']; ?>" />
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label"><? echo $vis_language['TXTACCOUNTSID']; ?></label>
	<div class="col-sm-10">
		<input type="text" class="form-control input-sm" name="vis_account_sid" id="vis_account_sid" value="<? echo $exotel_details['host_name']; ?>" />
	</div>
</div>
<div class="form-group">
	<label class="col-sm-2 control-label"><? echo $vis_language['TXTAUTHTOKEN']; ?></label>
	<div class="col-sm-10">
		 <input type="text" class="form-control input-sm" name="vis_auth_token" id="vis_auth_token" value="<? echo $exotel_details['user_name']; ?>" />
	</div>
</div>
<?php /*
<div class="form-group">
	<label class="col-sm-2 control-label p-d-sm"><? echo $vis_language['TXTAPPSSID']; ?></label>
	<div class="col-sm-10">
		<input class="form-control input-sm" type="text"  name="vis_app_sid" id="vis_app_sid" value="<? echo $exotel_details['db_password']; ?>" >
	</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($exotel_details['is_enabled']!=1) echo 'radio-no-uncheck'; ?>  >
		<input type="checkbox"  name="vis_status_exotel"  id="vis_status_exotel" value="1" <? if($exotel_details['is_enabled']==1 || !isset($exotel_details['is_enabled'])) echo ' checked="checked"'; ?> > 
		<span></span>
		</label>
	</div>
</div>



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

<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_exotel_setting', 'vis_form':'vis_integration_form'})"><? echo $vis_language['TXTSAVE']; ?></button>
             <? if($exotel_details !=-1 && !empty($exotel_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':38})"><? echo $vis_language['TXTDELETE']; ?></button>
             <? } ?>
		</div>
		<? if($exotel_details !=-1 && !empty($exotel_details)) {?> 
		<div class="col-sm-6 text-right">
			<ul class="navSeprator m-n bred_rlink">
				<li><a href="#/setting/exotel_apps/Exotel-Apps/<? echo $exotel_details['integration_id']; ?>" class="link"><? echo $vis_language['TXTEXOTELAPPS']; ?></a></li>
			</ul>
		</div>
		<? } ?>
	</div>
</form>

