clrghouz/resources/views/auth/login.blade.php

112 lines
3.4 KiB
PHP
Raw Normal View History

2021-05-03 12:53:40 +00:00
@extends('layouts.auth')
@section('htmlheader_title')
Log in
@endsection
@section('content')
2024-04-25 05:27:45 +00:00
@if(isset($login_note) && $login_note)
2021-06-13 03:56:27 +00:00
<div class="row">
<div class="col-8 m-auto">
<div class="alert alert-info alert-dismissible" role="alert">
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
<h4 class="alert-heading">
<svg class="bi flex-shrink-0 me-2" width="24" height="24" role="img" aria-label="Info:"><use xlink:href="#info-fill"/></svg>
NOTE!
</h4>
{!! $login_note !!}
</div>
</div>
2021-05-03 12:53:40 +00:00
</div>
@endisset
2024-04-25 05:27:45 +00:00
<form class="needs-validation" method="post" novalidate>
@csrf
2021-05-03 12:53:40 +00:00
2024-04-25 05:27:45 +00:00
<div class="row">
<div class="col-6 m-auto">
<div class="greyframe titledbox shadow0xb0 text-center">
<h2 class="cap">Login</h2>
2021-05-03 12:53:40 +00:00
<div class="row">
2021-06-13 03:56:27 +00:00
<div class="col-12">
<label for="email" class="form-label">Email</label>
<div class="input-group has-validation">
<span class="input-group-text"><i class="bi bi-person-badge"></i></span>
2024-04-25 05:27:45 +00:00
<!-- Conditionally display passkeys in autofill -->
<input type="text" class="form-control @error('email') is-invalid @enderror" id="email" placeholder="Email" name="email" required autocomplete="email webauthn" autofocus>
<span class="invalid-feedback" role="alert">
@error('email')
2021-06-13 13:00:26 +00:00
{{ $message }}
@else
2021-06-13 13:00:26 +00:00
Your email is required.
@enderror
</span>
2021-05-03 12:53:40 +00:00
</div>
</div>
</div>
<div class="row">
2021-06-13 03:56:27 +00:00
<div class="col-12">
<label for="password" class="form-label">Password</label>
<div class="input-group has-validation">
<span class="input-group-text"><i class="bi bi-key-fill"></i></span>
2024-04-25 05:27:45 +00:00
<input type="password" class="form-control" id="password" placeholder="Password" name="password" autocomplete="new-password" required>
<span class="invalid-feedback" role="alert">
2021-06-13 03:56:27 +00:00
Your password is required.
2021-06-13 13:00:26 +00:00
</span>
2021-05-03 12:53:40 +00:00
</div>
</div>
</div>
<div class="row">
2021-06-13 03:56:27 +00:00
<div class="col-4">
<label><input type="checkbox" name="remember"> Remember Me</label>
2021-05-03 12:53:40 +00:00
</div>
</div>
<div class="row">
<div class="col-12">
2021-06-13 03:56:27 +00:00
<a href="{{ url('/') }}" class="btn btn-danger">Cancel</a>
<button type="submit" name="submit" class="btn btn-success float-end">Sign In</button>
2021-05-03 12:53:40 +00:00
</div>
</div>
2024-04-25 05:27:45 +00:00
<div class="row">
<div class="col-lg-6 col-12">
<div class="row">
<div class="col-12">
<a class="link-danger" href="{{ url('password/reset') }}">Forgot Password</a>
</div>
</div>
<div class="row">
<div class="col-12">
<a class="link-danger" href="{{ url('register') }}">Register</a>
</div>
</div>
2024-04-25 05:27:45 +00:00
</div>
2021-05-03 12:53:40 +00:00
<div class="col-lg-6 col-12">
<button type="submit" id="passkey" name="submit" class="btn btn-primary float-end"><i class="bi bi-key"></i> Passkey</button>
2024-04-25 05:27:45 +00:00
</div>
2021-06-13 03:56:27 +00:00
</div>
</div>
2021-05-03 12:53:40 +00:00
</div>
</div>
2024-04-25 05:27:45 +00:00
</form>
@endsection
@section('page-scripts')
<!-- Passkeys -->
<script type='text/javascript' src='{{ asset('/passkey/passkey.js') }}'></script>
<script type="text/javascript">
$(document).ready(function() {
$('#passkey').on('click',function() {
passkey_check('{{ csrf_token() }}','{{ back()->getTargetUrl() }}');
return false;
});
});
2024-04-25 05:27:45 +00:00
</script>
@append