123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209 |
- @extends('frontend.layouts.app')
- @section('content')
- <section class="gry-bg py-5">
- <div class="profile">
- <div class="container">
- <div class="row">
- <div class="col-xxl-4 col-xl-5 col-lg-6 col-md-8 mx-auto">
- <div class="card">
- <div class="text-center pt-4">
- <h1 class="h4 fw-600">
- {{ translate('Login to your account.')}}
- </h1>
- </div>
- <div class="px-4 py-3 py-lg-4">
- <div class="">
- <form class="form-default" role="form" action="{{ route('login') }}" method="POST">
- @csrf
- @if (addon_is_activated('otp_system') && env("DEMO_MODE") != "On")
- <div class="form-group phone-form-group mb-1">
- <input type="tel" id="phone-code" class="form-control{{ $errors->has('phone') ? ' is-invalid' : '' }}" value="{{ old('phone') }}" placeholder="" name="phone" autocomplete="off">
- </div>
- <input type="hidden" name="country_code" value="">
- <div class="form-group email-form-group mb-1 d-none">
- <input type="email" class="form-control {{ $errors->has('email') ? ' is-invalid' : '' }}" value="{{ old('email') }}" placeholder="{{ translate('Email') }}" name="email" id="email" autocomplete="off">
- @if ($errors->has('email'))
- <span class="invalid-feedback" role="alert">
- <strong>{{ $errors->first('email') }}</strong>
- </span>
- @endif
- </div>
- <div class="form-group text-right">
- <button class="btn btn-link p-0 opacity-50 text-reset" type="button" onclick="toggleEmailPhone(this)">{{ translate('Use Email Instead') }}</button>
- </div>
- @else
- <div class="form-group">
- <input type="email" class="form-control{{ $errors->has('email') ? ' is-invalid' : '' }}" value="{{ old('email') }}" placeholder="{{ translate('Email') }}" name="email" id="email" autocomplete="off">
- @if ($errors->has('email'))
- <span class="invalid-feedback" role="alert">
- <strong>{{ $errors->first('email') }}</strong>
- </span>
- @endif
- </div>
- @endif
- <div class="form-group">
- <input type="password" class="form-control {{ $errors->has('password') ? ' is-invalid' : '' }}" placeholder="{{ translate('Password')}}" name="password" id="password">
- </div>
- <div class="row mb-2">
- <div class="col-6">
- <label class="aiz-checkbox">
- <input type="checkbox" name="remember" {{ old('remember') ? 'checked' : '' }}>
- <span class=opacity-60>{{ translate('Remember Me') }}</span>
- <span class="aiz-square-check"></span>
- </label>
- </div>
- <div class="col-6 text-right">
- <a href="{{ route('password.request') }}" class="text-reset opacity-60 fs-14">{{ translate('Forgot password?')}}</a>
- </div>
- </div>
- <div class="mb-5">
- <button type="submit" class="btn btn-primary btn-block fw-600">{{ translate('Login') }}</button>
- </div>
- </form>
- @if (env("DEMO_MODE") == "On")
- <div class="mb-5">
- <table class="table table-bordered mb-0">
- <tbody>
- <tr>
- <td>{{ translate('Seller Account')}}</td>
- <td>
- <button class="btn btn-info btn-sm" onclick="autoFillSeller()">{{ translate('Copy credentials') }}</button>
- </td>
- </tr>
- <tr>
- <td>{{ translate('Customer Account')}}</td>
- <td>
- <button class="btn btn-info btn-sm" onclick="autoFillCustomer()">{{ translate('Copy credentials') }}</button>
- </td>
- </tr>
- <tr>
- <td>{{ translate('Delivery Boy Account')}}</td>
- <td>
- <button class="btn btn-info btn-sm" onclick="autoFillDeliveryBoy()">{{ translate('Copy credentials') }}</button>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- @endif
- @if(get_setting('google_login') == 1 || get_setting('facebook_login') == 1 || get_setting('twitter_login') == 1)
- <div class="separator mb-3">
- <span class="bg-white px-3 opacity-60">{{ translate('Or Login With')}}</span>
- </div>
- <ul class="list-inline social colored text-center mb-5">
- @if (get_setting('facebook_login') == 1)
- <li class="list-inline-item">
- <a href="{{ route('social.login', ['provider' => 'facebook']) }}" class="facebook">
- <i class="lab la-facebook-f"></i>
- </a>
- </li>
- @endif
- @if(get_setting('google_login') == 1)
- <li class="list-inline-item">
- <a href="{{ route('social.login', ['provider' => 'google']) }}" class="google">
- <i class="lab la-google"></i>
- </a>
- </li>
- @endif
- @if (get_setting('twitter_login') == 1)
- <li class="list-inline-item">
- <a href="{{ route('social.login', ['provider' => 'twitter']) }}" class="twitter">
- <i class="lab la-twitter"></i>
- </a>
- </li>
- @endif
- </ul>
- @endif
- </div>
- <div class="text-center">
- <p class="text-muted mb-0">{{ translate('Dont have an account?')}}</p>
- <a href="{{ route('user.registration') }}">{{ translate('Register Now')}}</a>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </section>
- @endsection
- @section('script')
- <script type="text/javascript">
- var isPhoneShown = true,
- countryData = window.intlTelInputGlobals.getCountryData(),
- input = document.querySelector("#phone-code");
- for (var i = 0; i < countryData.length; i++) {
- var country = countryData[i];
- if(country.iso2 == 'bd'){
- country.dialCode = '88';
- }
- }
- var iti = intlTelInput(input, {
- separateDialCode: true,
- utilsScript: "{{ static_asset('assets/js/intlTelutils.js') }}?1590403638580",
- onlyCountries: @php echo json_encode(\App\Models\Country::where('status', 1)->pluck('code')->toArray()) @endphp,
- customPlaceholder: function(selectedCountryPlaceholder, selectedCountryData) {
- if(selectedCountryData.iso2 == 'bd'){
- return "01xxxxxxxxx";
- }
- return selectedCountryPlaceholder;
- }
- });
- var country = iti.getSelectedCountryData();
- $('input[name=country_code]').val(country.dialCode);
- input.addEventListener("countrychange", function(e) {
- // var currentMask = e.currentTarget.placeholder;
- var country = iti.getSelectedCountryData();
- $('input[name=country_code]').val(country.dialCode);
- });
- function toggleEmailPhone(el){
- if(isPhoneShown){
- $('.phone-form-group').addClass('d-none');
- $('.email-form-group').removeClass('d-none');
- $('input[name=phone]').val(null);
- isPhoneShown = false;
- $(el).html('{{ translate('Use Phone Instead') }}');
- }
- else{
- $('.phone-form-group').removeClass('d-none');
- $('.email-form-group').addClass('d-none');
- $('input[name=email]').val(null);
- isPhoneShown = true;
- $(el).html('{{ translate('Use Email Instead') }}');
- }
- }
- function autoFillSeller(){
- $('#email').val('seller@example.com');
- $('#password').val('123456');
- }
- function autoFillCustomer(){
- $('#email').val('customer@example.com');
- $('#password').val('123456');
- }
- function autoFillDeliveryBoy(){
- $('#email').val('deliveryboy@example.com');
- $('#password').val('123456');
- }
- </script>
- @endsection
|