View file startup/templates/startup/follow.html

File size: 2.57Kb
<div class="container">
	<div class="pg_start_step step-three-active">
		<div class="line">
			<div class="line_sec"></div>
			<div class="dot one"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg><span>{{LANG image}}</span></div>
			<div class="dot two"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg><span>Info</span></div>
			<div class="dot three"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg><span>{{LANG follow}}</span></div>
		</div>
	</div>
	<div class="pg_page padd pp_startup">
		<form id="startup_follow">
			<div class="start_head">
				<h3>{{LANG follow_famous}}</h3>
			</div>
			<?php if ($context['follow']) { ?>
				<div class="pg_folw_sugg_carousel tl-follow-suggestions" id="follow-suggestions-cr">
					<?php foreach ($context['follow'] as $key => $follow_sugg) { ?>
						<div class="item">
							<div class="avatar">
								<img src="<?php echo($follow_sugg['avatar']) ?>" alt="Picture">
								<div class="valign uname">
									<a href="<?php echo($follow_sugg['url']) ?>"><h4><?php echo($follow_sugg['username']) ?></h4></a>
								</div>
							</div>
						</div>
					<?php } ?>
				</div>
			<?php } ?>
			<div class="valign pg_start_subtn">
				<small onclick="skip_startup()">{{LANG skip_step}}</small>
				<button class="btn btn-main btn-mat btn-mat-raised" type="submit">{{LANG follow_c}}</button>
			</div>
			<input type="hidden" name="hash" value="<?php echo($context['csrf_token']) ?>">
			<input type="hidden" name="ids" value="<?php echo($context['ids']) ?>">
		</form>
	</div>
</div>

<script type="text/javascript">
function skip_startup() {
	$.post(link('startup/skip'), function(data, textStatus, xhr) {
		window.location.href = site_url('')
	});
}

jQuery(document).ready(function($) {
	var form = $("form#startup_follow");
	form.ajaxForm({
		url: link('startup/startup_follow'),
		type: 'POST',
		dataType: 'json',
		beforeSend: function(){
			$('form').find('button[type="submit"]').attr('disabled','true');
		},
		success: function(data){
			if (data.status == 200) {
				window.location.href = site_url('')
			}
	        $('form').find('button[type="submit"]').removeAttr('disabled');
		}
	});	
});
</script>