<? global $vis_language; ?>

<section id="breadcrumb" class="row m-b m-l-none m-r-none">
	<div class="col-sm-6">
		<h3 class="m-b-xs text-black"><span><?echo $vis_language['TXTFACEBOOK'];?></span></h3>
		<ul class="breadcrumb bg-empty no-border m-b-xxs no-padder">
			<li><a class="link" href="#/home/quick_view"><?echo $vis_language['TXTHOME'];?></a></li>
			<li><a class="link" href="#/setting/setting_menu/Settings" onclick="$('#vis_workpanel_div').visExecution('load_module','<?echo $vis_language['TXTSETTINGS'];?>',{'vis_module':'setting','vis_operation':'setting_menu'});"><?echo $vis_language['TXTSETTINGS'];?></a></li>
			<li><a  class="link" href="#/setting/integration_list/<? echo $vis_language['TXTFACEBOOK'];?>/4" class="link"><?echo $vis_language['TXTFACEBOOK'];?></a> </li>
			<li class="active"><?echo $vis_language['TXTUPDATEFACEBOOK'];?></li>
		</ul>
	</div>
</section>
<input type="hidden" name="vis_integration_id"  id="vis_integration_id" value="<? echo $fb_details['integration_id']; ?>"/>
<section class="padder">
	<section class="panel panel-default">
		<header class="panel-heading sub_header"><? echo $vis_language['TXTUPDATEFACEBOOK']; ?></header>
		<div class="panel-body">
		<form class="form-horizontal" id="vis_integration_form" name="vis_integration_form" method="post" >
        	<div class="form-group">
				<label class="col-sm-2 control-label"><? echo $vis_language['TXTAPPID']; ?></label>
				<div class="col-sm-10">
					<input class="form-control input-sm" type="text" name="fb_app_id" id="fb_app_id" value="<? echo $fb_details['host_name']; ?>" />
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label"><? echo $vis_language['TXTAPPSECRETKEY']; ?></label>
				<div class="col-sm-10">
					<input class="form-control input-sm" type="text" name="fb_secret" id="fb_secret" value="<? echo base64_decode($fb_details['api_key']); ?>" >
				</div>
			</div>
            <!--<div class="form-group">
				<label class="col-sm-2 control-label"><? echo$vis_language['TXTFACEBOOKPAGEID']; ?></label>
				<div class="col-sm-10">
					<input type="text" class="form-control input-sm" name="vis_facebook_id" id="vis_facebook_id" value="<? echo $fb_details['user_name']; ?>" />
				</div>
			</div>-->
            <div class="form-group">
				<label class="col-sm-2 control-label"><? echo$vis_language['TXTACCESSTOKEN']; ?></label>
				<div class="col-sm-10">
					<input type="text" class="form-control input-sm" name="vis_token" id="vis_token" value="<? echo $fb_details['db_password']; ?>" />
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label"><? echo $vis_language['TXTCANVASURL']; ?></label>
				<div class="col-sm-10">
					<input class="form-control input-sm" type="text" name="fb_canvas_url" id="fb_canvas_url" value="<? echo $fb_details['billing_url']; ?>">
				</div>
			</div>
			<div class="form-group">
               <label class="col-sm-2 control-label p-d-sm"><? echo $vis_language['TXTFETCHALLPOST']; ?></label>
               <div class="col-sm-1">
                  <label class="switch">
                  <input type="checkbox" <?php if($fb_details['admin_password']==1){ echo ' checked="checked" '; } ?> name="vis_fetchtype"  id="vis_fetchtype">
                  <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_fb', 'vis_integration_id':'<? echo $fb_details['integration_id'];?>', 'vis_form':'vis_integration_form'})"><? echo $vis_language['TXTUPDATE']; ?></button>
					</div>
				</div>
			</div>
		</form>
		</div>
	</section>
</section>