<? 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 $twilio_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 $twilio_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 $twilio_details['user_name']; ?>" />
	</div>
</div>
<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 $twilio_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($twilio_details['is_enabled']!=1) echo 'radio-no-uncheck'; ?>  >
		<input type="checkbox"  name="vis_status_twilio"  id="vis_status_twilio" value="1" <? if($twilio_details['is_enabled']==1 || !isset($twilio_details['is_enabled'])) echo ' checked="checked"'; ?> > 
		<span></span>
		</label>
	</div>
</div>



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

<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_twilio_setting', 'vis_form':'vis_integration_form'})"><? echo $vis_language['TXTSAVE']; ?></button>
             <? if($twilio_details !=-1 && !empty($twilio_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'})"><? echo $vis_language['TXTDELETE']; ?></button>
             <? } ?>
		</div>
	</div>
</form>

