View file settings/templates/settings/includes/business_account.html

File size: 12.17Kb
<div class="sett-active">
	<h2 class="user_sttng_panel_hd">{{LANG business_account}}</h2>
	<?php if ($context['bus_requested'] > 0) { ?>
		<div class="empty_state">
			<span><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M11.602 13.76l1.412 1.412 8.466-8.466 1.414 1.414-9.88 9.88-6.364-6.364 1.414-1.414 2.125 2.125 1.413 1.412zm.002-2.828l4.952-4.953 1.41 1.41-4.952 4.953-1.41-1.41zm-2.827 5.655L7.364 18 1 11.636l1.414-1.414 1.413 1.413-.001.001 4.951 4.951z"/></svg></span>
			<p>{{LANG bus_request_done}}</p>
		</div>
	<?php } else{ ?>
	<form class="form pp_sett_form" id="business-profile-settings">
		<div class="pg_mat_input">
			<input type="text" name="business_name" placeholder="{{LANG business_name}}">
			<label>{{LANG business_name}}</label>
		</div>
		<div class="pg_mat_input">
			<input type="email" name="email" placeholder="{{LANG email}}">
			<label>{{LANG email}}</label>
		</div>
		<div class="pg_mat_input">
			<input type="tel" name="phone" placeholder="{{LANG phone_number}}">
			<label>{{LANG phone_number}}</label>
		</div>
		<div class="pg_mat_input">
			<input type="url" name="website" placeholder="{{LANG website}}">
			<label>{{LANG website}}</label>
		</div>

		<?php if ($context['me']['verified'] == 0) { ?>
			<p class="verify_text_1">{{LANG upload_docs}}</p>
			<p class="verify_text_2">{{LANG select_verif_images}}</p>
			<div class="row">
				<div class="col-md-6">
					<div class="fak_image pg_fak_img" onclick="document.getElementById('user-photo').click(); return false">
						<div class="upload_fk_image">
							<svg height="512pt" viewBox="0 -43 512.00003 512" width="512pt" xmlns="http://www.w3.org/2000/svg"><path d="m68.265625 262.570312v-185.769531c0-4.714843 3.820313-8.535156 8.535156-8.535156h358.398438c4.714843 0 8.535156 3.820313 8.535156 8.535156v187.734375zm0 0" fill="#b0d3f0"/><path d="m354.132812 155.734375-68.691406 67.15625-88.320312-86.355469-128.855469 126.035156v87.296876c0 4.710937 3.820313 8.53125 8.535156 8.53125h358.398438c4.714843 0 8.535156-3.820313 8.535156-8.53125v-106.496094zm0 0" fill="#4fba6f"/><path d="m443.734375 243.371094v106.496094c0 4.710937-3.820313 8.53125-8.535156 8.53125h-9.726563l-130.21875-125.863282-9.8125-9.644531 68.691406-67.15625zm0 0" fill="#24ae5f"/><g fill="#67b9cc"><path d="m469.332031 34.132812h-17.066406c-4.710937 0-8.53125-3.820312-8.53125-8.53125 0-4.714843 3.820313-8.535156 8.53125-8.535156h17.066406c4.714844 0 8.535157 3.820313 8.535157 8.535156 0 4.710938-3.820313 8.53125-8.535157 8.53125zm-51.199219 0h-34.132812c-4.710938 0-8.535156-3.820312-8.535156-8.53125 0-4.714843 3.824218-8.535156 8.535156-8.535156h34.132812c4.714844 0 8.535157 3.820313 8.535157 8.535156 0 4.710938-3.820313 8.53125-8.535157 8.53125zm-68.265624 0h-34.132813c-4.714844 0-8.535156-3.820312-8.535156-8.53125 0-4.714843 3.820312-8.535156 8.535156-8.535156h34.132813c4.710937 0 8.53125 3.820313 8.53125 8.535156 0 4.710938-3.820313 8.53125-8.53125 8.53125zm-68.265626 0h-34.136718c-4.710938 0-8.53125-3.820312-8.53125-8.53125 0-4.714843 3.820312-8.535156 8.53125-8.535156h34.136718c4.710938 0 8.53125 3.820313 8.53125 8.535156 0 4.710938-3.820312 8.53125-8.53125 8.53125zm-68.269531 0h-34.132812c-4.710938 0-8.53125-3.820312-8.53125-8.53125 0-4.714843 3.820312-8.535156 8.53125-8.535156h34.132812c4.714844 0 8.535157 3.820313 8.535157 8.535156 0 4.710938-3.820313 8.53125-8.535157 8.53125zm-68.265625 0h-34.132812c-4.714844 0-8.535156-3.820312-8.535156-8.53125 0-4.714843 3.820312-8.535156 8.535156-8.535156h34.132812c4.714844 0 8.535156 3.820313 8.535156 8.535156 0 4.710938-3.820312 8.53125-8.535156 8.53125zm-68.265625 0h-34.132812c-4.714844 0-8.535157-3.820312-8.535157-8.53125 0-4.714843 3.820313-8.535156 8.535157-8.535156h34.132812c4.710938 0 8.53125 3.820313 8.53125 8.535156 0 4.710938-3.820312 8.53125-8.53125 8.53125zm0 0"/><path d="m486.398438 358.398438c-4.710938 0-8.53125-3.820313-8.53125-8.53125v-34.132813c0-4.714844 3.820312-8.535156 8.53125-8.535156 4.714843 0 8.535156 3.820312 8.535156 8.535156v34.132813c0 4.710937-3.820313 8.53125-8.535156 8.53125zm0-68.265626c-4.710938 0-8.53125-3.820312-8.53125-8.53125v-34.136718c0-4.710938 3.820312-8.53125 8.53125-8.53125 4.714843 0 8.535156 3.820312 8.535156 8.53125v34.136718c0 4.710938-3.820313 8.53125-8.535156 8.53125zm0-68.265624c-4.710938 0-8.53125-3.820313-8.53125-8.535157v-34.132812c0-4.710938 3.820312-8.53125 8.53125-8.53125 4.714843 0 8.535156 3.820312 8.535156 8.53125v34.132812c0 4.714844-3.820313 8.535157-8.535156 8.535157zm0-68.265626c-4.710938 0-8.53125-3.820312-8.53125-8.535156v-34.132812c0-4.714844 3.820312-8.535156 8.53125-8.535156 4.714843 0 8.535156 3.820312 8.535156 8.535156v34.132812c0 4.714844-3.820313 8.535156-8.535156 8.535156zm0-68.269531c-4.710938 0-8.53125-3.820312-8.53125-8.53125v-34.132812c0-4.714844 3.820312-8.535157 8.53125-8.535157 4.714843 0 8.535156 3.820313 8.535156 8.535157v34.132812c0 4.710938-3.820313 8.53125-8.535156 8.53125zm0 0"/><path d="m469.332031 409.601562h-34.132812c-4.710938 0-8.53125-3.820312-8.53125-8.535156 0-4.710937 3.820312-8.53125 8.53125-8.53125h34.132812c4.714844 0 8.535157 3.820313 8.535157 8.53125 0 4.714844-3.820313 8.535156-8.535157 8.535156zm-68.265625 0h-34.132812c-4.714844 0-8.535156-3.820312-8.535156-8.535156 0-4.710937 3.820312-8.53125 8.535156-8.53125h34.132812c4.714844 0 8.535156 3.820313 8.535156 8.53125 0 4.714844-3.820312 8.535156-8.535156 8.535156zm-68.265625 0h-34.132812c-4.714844 0-8.535157-3.820312-8.535157-8.535156 0-4.710937 3.820313-8.53125 8.535157-8.53125h34.132812c4.710938 0 8.53125 3.820313 8.53125 8.53125 0 4.714844-3.820312 8.535156-8.53125 8.535156zm-68.265625 0h-34.136718c-4.710938 0-8.53125-3.820312-8.53125-8.535156 0-4.710937 3.820312-8.53125 8.53125-8.53125h34.136718c4.710938 0 8.53125 3.820313 8.53125 8.53125 0 4.714844-3.820312 8.535156-8.53125 8.535156zm-68.269531 0h-34.132813c-4.710937 0-8.53125-3.820312-8.53125-8.535156 0-4.710937 3.820313-8.53125 8.53125-8.53125h34.132813c4.714844 0 8.535156 3.820313 8.535156 8.53125 0 4.714844-3.820312 8.535156-8.535156 8.535156zm-68.265625 0h-34.132812c-4.714844 0-8.535157-3.820312-8.535157-8.535156 0-4.710937 3.820313-8.53125 8.535157-8.53125h34.132812c4.710938 0 8.535156 3.820313 8.535156 8.53125 0 4.714844-3.824218 8.535156-8.535156 8.535156zm-68.265625 0h-17.066406c-4.714844 0-8.535157-3.820312-8.535157-8.535156 0-4.710937 3.820313-8.53125 8.535157-8.53125h17.066406c4.710937 0 8.53125 3.820313 8.53125 8.53125 0 4.714844-3.820313 8.535156-8.53125 8.535156zm0 0"/><path d="m25.601562 392.535156c-4.714843 0-8.535156-3.824218-8.535156-8.535156v-34.132812c0-4.714844 3.820313-8.535157 8.535156-8.535157 4.710938 0 8.53125 3.820313 8.53125 8.535157v34.132812c0 4.710938-3.820312 8.535156-8.53125 8.535156zm0-68.269531c-4.714843 0-8.535156-3.820313-8.535156-8.53125v-34.132813c0-4.714843 3.820313-8.535156 8.535156-8.535156 4.710938 0 8.53125 3.820313 8.53125 8.535156v34.132813c0 4.710937-3.820312 8.53125-8.53125 8.53125zm0-68.265625c-4.714843 0-8.535156-3.820312-8.535156-8.535156v-34.132813c0-4.710937 3.820313-8.53125 8.535156-8.53125 4.710938 0 8.53125 3.820313 8.53125 8.53125v34.132813c0 4.714844-3.820312 8.535156-8.53125 8.535156zm0-68.265625c-4.714843 0-8.535156-3.820313-8.535156-8.535156v-34.132813c0-4.710937 3.820313-8.53125 8.535156-8.53125 4.710938 0 8.53125 3.820313 8.53125 8.53125v34.132813c0 4.714843-3.820312 8.535156-8.53125 8.535156zm0-68.269531c-4.714843 0-8.535156-3.820313-8.535156-8.53125v-34.132813c0-4.714843 3.820313-8.535156 8.535156-8.535156 4.710938 0 8.53125 3.820313 8.53125 8.535156v34.132813c0 4.710937-3.820312 8.53125-8.53125 8.53125zm0 0"/></g><path d="m477.867188 0h17.066406c9.425781 0 17.066406 7.640625 17.066406 17.066406v17.066406c0 9.425782-7.640625 17.066407-17.066406 17.066407h-17.066406c-9.425782 0-17.066407-7.640625-17.066407-17.066407v-17.066406c0-9.425781 7.640625-17.066406 17.066407-17.066406zm0 0" fill="#41767f"/><path d="m17.066406 0h17.066406c9.425782 0 17.066407 7.640625 17.066407 17.066406v17.066406c0 9.425782-7.640625 17.066407-17.066407 17.066407h-17.066406c-9.425781 0-17.066406-7.640625-17.066406-17.066407v-17.066406c0-9.425781 7.640625-17.066406 17.066406-17.066406zm0 0" fill="#41767f"/><path d="m17.066406 375.464844h17.066406c9.425782 0 17.066407 7.644531 17.066407 17.070312v17.066406c0 9.425782-7.640625 17.066407-17.066407 17.066407h-17.066406c-9.425781 0-17.066406-7.640625-17.066406-17.066407v-17.066406c0-9.425781 7.640625-17.070312 17.066406-17.070312zm0 0" fill="#41767f"/><path d="m477.867188 375.464844h17.066406c9.425781 0 17.066406 7.644531 17.066406 17.070312v17.066406c0 9.425782-7.640625 17.066407-17.066406 17.066407h-17.066406c-9.425782 0-17.066407-7.640625-17.066407-17.066407v-17.066406c0-9.425781 7.640625-17.070312 17.066407-17.070312zm0 0" fill="#41767f"/></svg>
							<p>{{LANG your_photo}}</p>
						</div>
						<div id="user_image"></div>
					</div>
				</div>
				<div class="col-md-6">
					<div class="fak_image pg_fak_img" onclick="document.getElementById('ip-photo').click(); return false">
						<div class="upload_fk_image">
							<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 59 59" xml:space="preserve"> <line style="fill:none;stroke:#424A60;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;" x1="32.5" y1="5" x2="35.5" y2="1"/> <path style="fill:#E7ECED;" d="M46.5,5h-34c-1.1,0-2,0.9-2,2v50c0,1.1,0.9,2,2,2h34c1.1,0,2-0.9,2-2V7C48.5,5.9,47.6,5,46.5,5z M29.5,14c-1.657,0-3-1.343-3-3s1.343-3,3-3s3,1.343,3,3S31.157,14,29.5,14z"/> <line style="fill:none;stroke:#424A60;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;" x1="24.5" y1="1" x2="29.5" y2="11"/> <rect x="20.5" y="18" style="fill:#EFCE4A;" width="18" height="18"/> <path style="fill:#424A60;" d="M39.5,43h-20c-0.553,0-1-0.447-1-1s0.447-1,1-1h20c0.553,0,1,0.447,1,1S40.053,43,39.5,43z"/> <path style="fill:#424A60;" d="M39.5,48h-20c-0.553,0-1-0.447-1-1s0.447-1,1-1h20c0.553,0,1,0.447,1,1S40.053,48,39.5,48z"/> <path style="fill:#424A60;" d="M39.5,53h-20c-0.553,0-1-0.447-1-1s0.447-1,1-1h20c0.553,0,1,0.447,1,1S40.053,53,39.5,53z"/> <g> <circle style="fill:#DC691D;" cx="29.5" cy="26" r="4"/> <path style="fill:#DC691D;" d="M29.5,30c-2.761,0-5,2.239-5,5v1h10v-1C34.5,32.239,32.261,30,29.5,30z"/> </g></svg>
							<p>{{LANG your_ip}}</p>
						</div>
						<div id="user_ip"></div>
					</div>
				</div>
			</div>
		<?php } ?>
		<div class="clear"></div>

		<div class="pg_sett_save"><button class="btn btn-main btn-mat btn-mat-raised pp_flat_btn" type="submit">{{LANG send}}</button></div>
		<input type="hidden" name="user_id" value="<?php echo($context['me']['user_id']) ?>">
		<input type="hidden" name="hash" value="<?php echo($context['csrf_token']) ?>">
		<input type="file" name="passport" class="hidden" id="ip-photo" accept="image/x-png,image/jpg,image/jpeg">
		<input type="file" name="photo" class="hidden" id="user-photo" accept="image/x-png,image/jpg,image/jpeg">
	</form>
	<?php } ?>
</div>
<script>
	jQuery(document).ready(function($) {
		$("#user_image").click(function(event) {
	        $("#user-photo").trigger('click');
	    });

	    $("#user_ip").click(function(event) {
	        $("#ip-photo").trigger('click');
	    });

	    $("#ip-photo").change(function(event) {
	        $("#user_ip").html("<img src='" + window.URL.createObjectURL(this.files[0]) + "' alt='Picture' width='100%'>")
	    });

	    $("#user-photo").change(function(event) {
	        $("#user_image").html("<img src='" + window.URL.createObjectURL(this.files[0]) + "' alt='Picture' width='100%'>")
	    });

		var form = $("form#business-profile-settings");
		form.ajaxForm({
			url: link('settings/business'),
			type: 'POST',
			dataType: 'json',
			beforeSend: function(){
				$(form).find('.pp_load_loader').addClass('loadingg');
				form.find('button[type="submit"]').attr('disabled','true');
			},
			success: function(data){
				$.toast(data.message,{
                	duration: 5000, 
                	type: 'success',
                	align: 'bottom',
                	singleton: true
                });
				$(form).find('.pp_load_loader').removeClass('loadingg');
				form.find('button[type="submit"]').removeAttr('disabled');
				if (data.status == 200) {
				    setTimeout(function () {
						window.location.reload();
					},3000);
				}
			}
		});
	});
</script>