CrestRoad/laravel/resources/views/road/success.blade.php

218 lines
13 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
@php
$pageTitle = !empty($email_verified) ? 'Email verified' : 'Registration Successful';
if (empty($email_verified) && Session::get('is_linked_user') != 'yes') {
if (($communication_mode ?? 'whatsapp') === 'email') {
$pageTitle = 'Confirm your email';
} elseif (($communication_mode ?? 'whatsapp') === 'both') {
$pageTitle = 'Confirm your registration';
} else {
$pageTitle = 'Verify WhatsApp';
}
}
@endphp
@include('layouts.shared/title-meta', ['title' => $pageTitle])
@include('layouts.shared/head-css', ["mode" => $mode ?? '', "demo" => $demo ?? ''])
</head>
<body class="loading authentication-bg authentication-bg-pattern">
<div class="account-pages mt-5 mb-5">
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 col-lg-6 col-xl-4">
<div class="card bg-pattern">
<div class="card-body p-4">
<div class="text-center w-75 m-auto">
@if($type == 'casper_clinic')
<div class="auth-logo">
<a href="{{route('any', 'index')}}" class="logo logo-dark text-center">
<span class="logo-lg">
<img src="{{asset('/casper_clinic/images/logo.png')}}" alt="" height="100">
</span>
</a>
<a href="{{route('any', 'index')}}" class="logo logo-light text-center">
<span class="logo-lg">
<img src="{{asset('/casper_clinic/images/logo.png')}}" alt="" height="100">
</span>
</a>
</div>
@elseif($type == 'spirometry_simplified')
<div class="auth-logo">
<a href="{{route('any', 'index')}}" class="logo logo-dark text-center">
<span class="logo-lg">
<img src="{{asset('/spirometry_simplified/images/logo.png')}}" alt="" height="100">
</span>
</a>
<a href="{{route('any', 'index')}}" class="logo logo-light text-center">
<span class="logo-lg">
<img src="{{asset('/spirometry_simplified/images/logo.png')}}" alt="" height="100">
</span>
</a>
</div>
@elseif($type == 'casper_clinic_new')
<div class="auth-logo">
<a href="{{route('any', 'index')}}" class="logo logo-dark text-center">
<span class="logo-lg">
<img src="{{asset('/casper_clinic_new/images/logo.png')}}" alt="" height="100">
</span>
</a>
<a href="{{route('any', 'index')}}" class="logo logo-light text-center">
<span class="logo-lg">
<img src="{{asset('/casper_clinic_new/images/logo.png')}}" alt="" height="100">
</span>
</a>
</div>
@elseif($type == 'casper_plus')
<div class="auth-logo">
<a href="{{route('any', 'index')}}" class="logo logo-dark text-center">
<span class="logo-lg">
<img src="{{asset('/casper_plus/images/logo.png')}}" alt="" height="100">
</span>
</a>
<a href="{{route('any', 'index')}}" class="logo logo-light text-center">
<span class="logo-lg">
<img src="{{asset('/casper_plus/images/logo.png')}}" alt="" height="100">
</span>
</a>
</div>
@elseif($type == 'spirometry_simplified')
<div class="auth-logo">
<a href="{{route('any', 'index')}}" class="logo logo-dark text-center">
<span class="logo-lg">
<img src="{{asset('/images/road-logo.jpg')}}" alt="" height="100">
</span>
</a>
<a href="{{route('any', 'index')}}" class="logo logo-light text-center">
<span class="logo-lg">
<img src="{{asset('/images/road-logo.jpg')}}" alt="" height="100">
</span>
</a>
</div>
@endif
</div>
<div class="mt-3 text-center">
<h3>Success!</h3>
@if(session('success'))
<p class="text-success font-14 mt-2">{{ session('success') }}</p>
@endif
@if(session('error'))
<p class="text-danger font-14 mt-2">{{ session('error') }}</p>
@endif
@if(!empty($email_verified))
<p class="text-muted font-14 mt-2">
Your email address has been verified. You are now registered for this CREST session.
</p>
@if(!empty($microsite_url))
<a href="{{ $microsite_url }}" class="btn w-100 btn-success rounded-pill waves-effect waves-light mt-3">
<span class="btn-label"><i class="mdi mdi-web"></i></span>
Visit session website
</a>
@endif
@else
<p class="text-muted font-14 mt-2">You have successfully registered for the Session.</p>
@if(Session::get('is_linked_user') == 'no')
@php
$mode = $communication_mode ?? 'whatsapp';
@endphp
@if($mode === 'email')
<p class="text-muted font-14 mt-2">
Please confirm your email address. We have sent a verification link to
@if(!empty($user_email))
<strong>{{ $user_email }}</strong>.
@else
the email address you provided.
@endif
Click the link in that email to complete your registration.
</p>
@if(!empty($code) && !empty($user_id))
<form method="post" action="{{ url('/registersuccess/resend-verification') }}" class="mt-3">
@csrf
<input type="hidden" name="code" value="{{ $code }}">
<input type="hidden" name="user_id" value="{{ $user_id }}">
<input type="hidden" name="email" value="{{ $user_email }}">
<button type="submit" class="btn w-100 btn-success rounded-pill waves-effect waves-light">
<span class="btn-label"><i class="mdi mdi-email-outline"></i></span>
Resend verification email
</button>
</form>
@else
<p class="text-warning font-14 mt-2">Please complete registration again to resend the verification email.</p>
@endif
@elseif($mode === 'both')
<p class="text-muted font-14 mt-2">
Please confirm your email address. We have sent a verification link to
@if(!empty($user_email))
<strong>{{ $user_email }}</strong>.
@else
the email address you provided.
@endif
</p>
@if(!empty($code) && !empty($user_id))
<form method="post" action="{{ url('/registersuccess/resend-verification') }}" class="mt-2 mb-3">
@csrf
<input type="hidden" name="code" value="{{ $code }}">
<input type="hidden" name="user_id" value="{{ $user_id }}">
<input type="hidden" name="email" value="{{ $user_email }}">
<button type="submit" class="btn w-100 btn-primary rounded-pill waves-effect waves-light">
<span class="btn-label"><i class="mdi mdi-email-outline"></i></span>
Resend verification email
</button>
</form>
@endif
<p class="text-muted font-14 mt-2">
You can also verify your WhatsApp number by clicking below. This will open WhatsApp with a pre-filled message — send it without changing the text.
</p>
<a href="https://wa.me/918142061298?text=CREST_VERIFY_{{$code}}_{{$user_id}}" class="btn w-100 btn-success rounded-pill waves-effect waves-light mt-2">
<span class="btn-label"><i class="mdi mdi-whatsapp"></i></span>
Verify WhatsApp number
</a>
@else
<p class="text-muted font-14 mt-2">
Please click the link below to verify your WhatsApp number. This will open WhatsApp and create a message — send it without changing the text.
</p>
<a href="https://wa.me/918142061298?text=CREST_VERIFY_{{$code}}_{{$user_id}}" class="btn w-100 btn-success rounded-pill waves-effect waves-light mt-3">
<span class="btn-label"><i class="mdi mdi-whatsapp"></i></span>
Verify WhatsApp number
</a>
@endif
@else
<p class="text-muted font-14 mt-2">You can now go back to the app and refresh the Sessions page to view pre-course and other related content.</p>
@endif
@endif
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@include('layouts.shared/footer-script')
</body>
</html>