Modificiones para que funcione el Shield y updates

This commit is contained in:
imnavajas
2024-05-01 15:33:01 +02:00
parent f80d0dc52a
commit c78b3d8488
35 changed files with 1720 additions and 727 deletions

View File

@ -0,0 +1,31 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
<meta name="x-apple-disable-message-reformatting">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?= lang('Auth.email2FASubject') ?></title>
</head>
<body>
<p><?= lang('Auth.email2FAMailBody') ?></p>
<div style="text-align: center">
<h1><?= $code ?></h1>
</div>
<table role="presentation" border="0" cellpadding="0" cellspacing="0" style="width: 100%;" width="100%">
<tbody>
<tr>
<td style="line-height: 20px; font-size: 20px; width: 100%; height: 20px; margin: 0;" align="left" width="100%" height="20">
&#160;
</td>
</tr>
</tbody>
</table>
<b><?= lang('Auth.emailInfo') ?></b>
<p><?= lang('Auth.emailIpAddress') ?> <?= esc($ipAddress) ?></p>
<p><?= lang('Auth.emailDevice') ?> <?= esc($userAgent) ?></p>
<p><?= lang('Auth.emailDate') ?> <?= esc($date) ?></p>
</body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
<meta name="x-apple-disable-message-reformatting">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?= lang('Auth.emailActivateSubject') ?></title>
</head>
<body>
<p><?= lang('Auth.emailActivateMailBody') ?></p>
<div style="text-align: center">
<h1><?= $code ?></h1>
</div>
<table role="presentation" border="0" cellpadding="0" cellspacing="0" style="width: 100%;" width="100%">
<tbody>
<tr>
<td style="line-height: 20px; font-size: 20px; width: 100%; height: 20px; margin: 0;" align="left" width="100%" height="20">
&#160;
</td>
</tr>
</tbody>
</table>
<b><?= lang('Auth.emailInfo') ?></b>
<p><?= lang('Auth.emailIpAddress') ?> <?= esc($ipAddress) ?></p>
<p><?= lang('Auth.emailDevice') ?> <?= esc($userAgent) ?></p>
<p><?= lang('Auth.emailDate') ?> <?= esc($date) ?></p>
</body>
</html>

View File

@ -0,0 +1,36 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
<meta name="x-apple-disable-message-reformatting">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?= lang('Auth.magicLinkSubject') ?></title>
</head>
<body>
<table role="presentation" border="0" cellpadding="0" cellspacing="0" style="border-radius: 6px; border-collapse: separate !important;">
<tbody>
<tr>
<td style="line-height: 24px; font-size: 16px; border-radius: 6px; margin: 0;" align="center" bgcolor="#0d6efd">
<a href="<?= url_to('verify-magic-link') ?>?token=<?= $token ?>" style="color: #ffffff; font-size: 16px; font-family: Helvetica, Arial, sans-serif; text-decoration: none; border-radius: 6px; line-height: 20px; display: inline-block; font-weight: normal; white-space: nowrap; background-color: #0d6efd; padding: 8px 12px; border: 1px solid #0d6efd;"><?= lang('Auth.login') ?></a>
</td>
</tr>
</tbody>
</table>
<table role="presentation" border="0" cellpadding="0" cellspacing="0" style="width: 100%;" width="100%">
<tbody>
<tr>
<td style="line-height: 20px; font-size: 20px; width: 100%; height: 20px; margin: 0;" align="left" width="100%" height="20">
&#160;
</td>
</tr>
</tbody>
</table>
<b><?= lang('Auth.emailInfo') ?></b>
<p><?= lang('Auth.emailIpAddress') ?> <?= esc($ipAddress) ?></p>
<p><?= lang('Auth.emailDevice') ?> <?= esc($userAgent) ?></p>
<p><?= lang('Auth.emailDate') ?> <?= esc($date) ?></p>
</body>
</html>

View File

@ -0,0 +1,38 @@
<?= $this->extend(config('Auth')->views['layout']) ?>
<?= $this->section('title') ?><?= lang('Auth.email2FATitle') ?> <?= $this->endSection() ?>
<?= $this->section('main') ?>
<div class="container d-flex justify-content-center p-5">
<div class="card col-12 col-md-5 shadow-sm">
<div class="card-body">
<h5 class="card-title mb-5"><?= lang('Auth.email2FATitle') ?></h5>
<p><?= lang('Auth.confirmEmailAddress') ?></p>
<?php if (session('error')) : ?>
<div class="alert alert-danger"><?= session('error') ?></div>
<?php endif ?>
<form action="<?= url_to('auth-action-handle') ?>" method="post">
<?= csrf_field() ?>
<!-- Email -->
<div class="mb-2">
<input type="email" class="form-control" name="email"
inputmode="email" autocomplete="email" placeholder="<?= lang('Auth.email') ?>"
<?php /** @var CodeIgniter\Shield\Entities\User $user */ ?>
value="<?= old('email', $user->email) ?>" required>
</div>
<div class="d-grid col-8 mx-auto m-3">
<button type="submit" class="btn btn-primary btn-block"><?= lang('Auth.send') ?></button>
</div>
</form>
</div>
</div>
</div>
<?= $this->endSection() ?>

View File

@ -0,0 +1,36 @@
<?= $this->extend(config('Auth')->views['layout']) ?>
<?= $this->section('title') ?><?= lang('Auth.email2FATitle') ?> <?= $this->endSection() ?>
<?= $this->section('main') ?>
<div class="container d-flex justify-content-center p-5">
<div class="card col-12 col-md-5 shadow-sm">
<div class="card-body">
<h5 class="card-title mb-5"><?= lang('Auth.emailEnterCode') ?></h5>
<p><?= lang('Auth.emailConfirmCode') ?></p>
<?php if (session('error') !== null) : ?>
<div class="alert alert-danger"><?= session('error') ?></div>
<?php endif ?>
<form action="<?= url_to('auth-action-verify') ?>" method="post">
<?= csrf_field() ?>
<!-- Code -->
<div class="mb-2">
<input type="number" class="form-control" name="token" placeholder="000000"
inputmode="numeric" pattern="[0-9]*" autocomplete="one-time-code" required>
</div>
<div class="d-grid col-8 mx-auto m-3">
<button type="submit" class="btn btn-primary btn-block"><?= lang('Auth.confirm') ?></button>
</div>
</form>
</div>
</div>
</div>
<?= $this->endSection() ?>

View File

@ -0,0 +1,37 @@
<?= $this->extend(config('Auth')->views['layout']) ?>
<?= $this->section('title') ?><?= lang('Auth.emailActivateTitle') ?> <?= $this->endSection() ?>
<?= $this->section('main') ?>
<div class="container d-flex justify-content-center p-5">
<div class="card col-12 col-md-5 shadow-sm">
<div class="card-body">
<h5 class="card-title mb-5"><?= lang('Auth.emailActivateTitle') ?></h5>
<?php if (session('error')) : ?>
<div class="alert alert-danger"><?= session('error') ?></div>
<?php endif ?>
<p><?= lang('Auth.emailActivateBody') ?></p>
<form action="<?= url_to('auth-action-verify') ?>" method="post">
<?= csrf_field() ?>
<!-- Code -->
<div class="form-floating mb-2">
<input type="text" class="form-control" id="floatingTokenInput" name="token" placeholder="000000" inputmode="numeric"
pattern="[0-9]*" autocomplete="one-time-code" value="<?= old('token') ?>" required>
<label for="floatingTokenInput"><?= lang('Auth.token') ?></label>
</div>
<div class="d-grid col-8 mx-auto m-3">
<button type="submit" class="btn btn-primary btn-block"><?= lang('Auth.send') ?></button>
</div>
</form>
</div>
</div>
</div>
<?= $this->endSection() ?>

View File

@ -0,0 +1,116 @@
<?php
$session = session();
$settings = $session->get('settings');
?>
<!DOCTYPE html>
<html
lang="<?= $settings['default_language'] ?? 'es' ?>"
class="h-100"
class="dark-style customizer-hide"
dir="ltr"
data-theme="theme-default"
data-assets-path="<?= site_url('themes/vuexy/') ?>"
data-template="vertical-menu-template-no-customizer"
>
<head>
<meta charset="utf-8">
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"
/>
<title><?= $this->renderSection('title') ?></title>
<?php
$baseImgUrl = site_url('themes/vuexy/img/favicon');
$baseThemeUrl = site_url('themes/vuexy');
?>
<!-- Favicon -->
<link rel="icon" type="image/x-icon" href="<?= $baseImgUrl . '/favicon.ico' ?>"/>
<link rel="apple-touch-icon" sizes="57x57" href="<?= $baseImgUrl . '/apple-icon-57x57.png' ?>">
<link rel="apple-touch-icon" sizes="60x60" href="<?= $baseImgUrl . '/apple-icon-60x60.png' ?>">
<link rel="apple-touch-icon" sizes="72x72" href="<?= $baseImgUrl . '/apple-icon-72x72.png' ?>">
<link rel="apple-touch-icon" sizes="76x76" href="<?= $baseImgUrl . '/apple-icon-76x76.png' ?>">
<link rel="apple-touch-icon" sizes="114x114" href="<?= $baseImgUrl . '/apple-icon-114x114.png' ?>">
<link rel="apple-touch-icon" sizes="120x120" href="<?= $baseImgUrl . '/apple-icon-120x120.png' ?>">
<link rel="apple-touch-icon" sizes="144x144" href="<?= $baseImgUrl . '/apple-icon-144x144.png' ?>">
<link rel="apple-touch-icon" sizes="152x152" href="<?= $baseImgUrl . '/apple-icon-152x152.png' ?>">
<link rel="apple-touch-icon" sizes="180x180" href="<?= $baseImgUrl . '/apple-icon-180x180.png' ?>">
<link rel="icon" type="image/png" sizes="192x192" href="<?= $baseImgUrl . '/android-icon-192x192.png' ?>">
<link rel="icon" type="image/png" sizes="32x32" href="<?= $baseImgUrl . '/favicon-32x32.png' ?>">
<link rel="icon" type="image/png" sizes="96x96" href="<?= $baseImgUrl . '/favicon-96x96.png' ?>">
<link rel="icon" type="image/png" sizes="16x16" href="<?= $baseImgUrl . '/favicon-16x16.png' ?>">
<link rel="manifest" href="<?= $baseImgUrl . '/manifest.json' ?>">
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com"/>
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin/>
<link
href="https://fonts.googleapis.com/css2?family=Public+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap"
rel="stylesheet"
/>
<!-- Icons -->
<link rel="stylesheet" href="<?= $baseThemeUrl . '/vendors/fonts/fontawesome.css' ?>"/>
<link rel="stylesheet" href="<?= $baseThemeUrl . '/vendors/fonts/tabler-icons.css' ?>"/>
<link rel="stylesheet" href="<?= $baseThemeUrl . '/vendors/fonts/flag-icons.css' ?>"/>
<!-- Core CSS -->
<link rel="stylesheet" href="<?= $baseThemeUrl . '/vendors/css/rtl/core-dark.css' ?>"/>
<link rel="stylesheet" href="<?= $baseThemeUrl . '/vendors/css/rtl/theme-default-dark.css' ?>"/>
<link rel="stylesheet" href="<?= $baseThemeUrl . '/css/safekat.css' ?>"/>
<!-- Vendors CSS -->
<link rel="stylesheet" href="<?= $baseThemeUrl . '/vendors/libs/perfect-scrollbar/perfect-scrollbar.css' ?>"/>
<link rel="stylesheet" href="<?= $baseThemeUrl . '/vendors/libs/node-waves/node-waves.css' ?>"/>
<link rel="stylesheet" href="<?= $baseThemeUrl . '/vendors/libs/typeahead-js/typeahead.css' ?>"/>
<link rel="stylesheet" href="<?= $baseThemeUrl . '/vendors/libs/toastr/toastr.css' ?>"/>
<!-- Vendor -->
<link rel="stylesheet" href="<?= $baseThemeUrl . '/vendors/libs/formvalidation/dist/css/formValidation.min.css' ?>"/>
<!-- Page CSS -->
<link rel="stylesheet" href="<?= $baseThemeUrl . '/vendors/css/pages/page-auth.css' ?>"/>
<!-- Helpers -->
<script src="<?= $baseThemeUrl . '/vendors/js/helpers.js' ?>"></script>
<script src="<?= $baseThemeUrl . '/js/config.js' ?>"></script>
</head>
<body>
<?= $this->renderSection('main') ?>
<?= $this->renderSection('pageScripts') ?>
<!-- Required vendors -->
<!-- Core JS -->
<script src="<?= $baseThemeUrl . '/vendors/libs/jquery/jquery.js' ?>"></script>
<script src="<?= $baseThemeUrl . '/vendors/libs/popper/popper.js' ?>"></script>
<script src="<?= $baseThemeUrl . '/vendors/js/bootstrap.js' ?>"></script>
<script src="<?= $baseThemeUrl . '/vendors/libs/perfect-scrollbar/perfect-scrollbar.js' ?>"></script>
<script src="<?= $baseThemeUrl . '/vendors/libs/node-waves/node-waves.js' ?>"></script>
<script src="<?= $baseThemeUrl . '/vendors/libs/hammer/hammer.js' ?>"></script>
<script src="<?= $baseThemeUrl . '/vendors/libs/i18n/i18n.js' ?>"></script>
<script src="<?= $baseThemeUrl . '/vendors/libs/typeahead-js/typeahead.js' ?>"></script>
<script src="<?= $baseThemeUrl . '/vendors/js/menu.js' ?>"></script>
<!-- Main JS -->
<script src="<?= $baseThemeUrl . '/js/main.js' ?>"></script>
<!-- Custom JS -->
<script>
function pass() {
"use strict";
var passwordField = document.getElementById('password');
var showPassIcon = document.getElementById('show_pass');
var isTextField = passwordField.type === 'text';
passwordField.type = isTextField ? 'password' : 'text';
showPassIcon.innerHTML = isTextField ? '<i class="ti ti-eye"></i>' : '<i class="ti ti-eye-off"></i>';
}
</script>
</body>
</html>

View File

@ -0,0 +1,136 @@
<?= $this->extend(config('Auth')->views['layout']) ?>
<?= $this->section('title') ?><?= lang('Auth.login') ?><?= $this->endSection() ?>
<?= $this->section('main') ?>
<!-- Content -->
<div class="authentication-wrapper authentication-cover authentication-bg">
<div class="authentication-inner row">
<!-- /Left Text -->
<div class="d-none d-lg-flex col-lg-7 p-0">
<div class="auth-cover-bg auth-cover-bg-color d-flex justify-content-center align-items-center">
<img
src="<?= site_url('themes/vuexy/img/safekat/login/auth-login-illustration-light.png') ?>"
alt="auth-login-cover"
class="img-fluid my-5 auth-illustration"
/>
<img
src="<?= site_url('themes/vuexy/img/illustrations/bg-shape-image-light.png'); ?>"
alt="auth-login-cover"
class="platform-bg"
/>
</div>
</div>
<!-- /Left Text -->
<!-- Login -->
<div class="d-flex col-12 col-lg-5 align-items-center p-sm-5 p-4">
<div class="w-px-400 mx-auto">
<!-- Logo -->
<div class="app-brand mb-4">
<a href="<?= site_url('login'); ?>" class="app-brand-link gap-2">
<span class="app-brand-logo">
<img src="<?= site_url('themes/vuexy/img/safekat/logos/sk-logo.png') ?>">
</span>
</a>
</div>
<!-- /Logo -->
<h3 class="mb-1 fw-bold"><?= lang('Auth.login') ?></h3>
<?php if (session('error') !== null) : ?>
<div class="alert alert-danger" role="alert"><?= session('error') ?></div>
<?php elseif (session('errors') !== null) : ?>
<div class="alert alert-danger" role="alert">
<?php if (is_array(session('errors'))) : ?>
<?php foreach (session('errors') as $error) : ?>
<?= $error ?>
<br>
<?php endforeach ?>
<?php else : ?>
<?= session('errors') ?>
<?php endif ?>
</div>
<?php endif ?>
<?php if (session('message') !== null) : ?>
<div class="alert alert-success" role="alert"><?= session('message') ?></div>
<?php endif ?>
<form id="formAuthentication" class="mb-3" action="<?= url_to('login') ?>" method="POST">
<?= csrf_field() ?>
<!-- Email -->
<div class="mb-3">
<label for="floatingEmailInput" class="form-label"><?= lang('Auth.email') ?></label>
<input
type="email"
class="form-control"
id="floatingEmailInput"
name="email"
inputmode="email"
placeholder="<?= lang('Auth.email') ?>"
value="<?= old('email') ?>"
required
autofocus
/>
</div>
<!-- Password -->
<div class="mb-3 form-password-toggle">
<div class="d-flex justify-content-between">
<label class="form-label" for="password"><?= lang('Auth.password') ?></label>
<?php if (setting('Auth.allowMagicLinkLogins')): ?>
<a href="<?= url_to('magic-link') ?>">
<small><?= lang('Auth.forgotPassword') ?></small>
</a>
<?php endif; ?>
</div>
<div class="input-group input-group-merge">
<input
type="password"
class="form-control"
id="floatingPasswordInput"
name="password"
inputmode="text"
autocomplete="current-password"
placeholder="<?= lang('Auth.password') ?>"
required
onclick="pass()"
/>
<span id="show_pass" class="input-group-text cursor-pointer"><i
class="ti ti-eye-off"></i></span>
</div>
</div>
<!-- Remember me -->
<?php if (setting('Auth.sessionConfig')['allowRemembering']): ?>
<div class="mb-3">
<div class="form-check">
<input type="checkbox" name="remember"
class="form-check-input" <?php if (old('remember')): ?> checked<?php endif ?>>
<label class="form-check-label"
for="remember"> <?= lang('Auth.rememberMe') ?> </label>
</div>
</div>
<?php endif; ?>
<button class="btn btn-primary d-grid w-100"><?= lang('Auth.login') ?></button>
</form>
<?php if (setting('Auth.allowRegistration')) : ?>
<p class="text-center">
<span><?= lang('Auth.needAccount') ?></span>
<a href="<?= url_to('register') ?>">
<span><?= lang('Auth.register') ?></span>
</a>
</p>
<?php endif; ?>
</div>
</div>
<!-- /Login -->
</div>
</div>
<!-- / Content -->
<?= $this->endSection() ?>

View File

@ -0,0 +1,91 @@
<?= $this->extend(config('Auth')->views['layout']) ?>
<?= $this->section('title') ?><?= lang('Auth.useMagicLink') ?> <?= $this->endSection() ?>
<?= $this->section('main') ?>
<!-- Content -->
<div class="authentication-wrapper authentication-cover authentication-bg">
<div class="authentication-inner row">
<!-- /Left Text -->
<div class="d-none d-lg-flex col-lg-6 p-0">
<div class="auth-cover-bg auth-cover-bg-color d-flex justify-content-center align-items-center">
<img
src="<?= site_url('themes/vuexy/img/safekat/login/auth-login-illustration-light.png') ?>"
alt="auth-forgot-password-cover"
class="img-fluid my-5 auth-illustration"
/>
<img
src="<?= site_url('themes/vuexy/img/illustrations/bg-shape-image-light.png'); ?>"
alt="auth-forgot-password-cover"
class="platform-bg"
/>
</div>
</div>
<!-- /Left Text -->
<!-- Forgot Password -->
<div class="d-flex col-12 col-lg-6 align-items-center p-sm-5 p-4">
<div class="w-px-500 mx-auto">
<!-- Logo -->
<div class="app-brand mb-4">
<a href="index.html" class="app-brand-link gap-2">
<span class="app-brand-logo">
<img src="<?= site_url('themes/vuexy/img/safekat/logos/sk-logo.png') ?>"
</span>
</a>
</div>
<!-- /Logo -->
<h3 class="mb-1 fw-bold"><?= lang('Auth.useMagicLink') ?></h3>
<?php if (session('error') !== null) : ?>
<div class="alert alert-danger" role="alert"><?= session('error') ?></div>
<?php elseif (session('errors') !== null) : ?>
<div class="alert alert-danger" role="alert">
<?php if (is_array(session('errors'))) : ?>
<?php foreach (session('errors') as $error) : ?>
<?= $error ?>
<br>
<?php endforeach ?>
<?php else : ?>
<?= session('errors') ?>
<?php endif ?>
</div>
<?php endif ?>
<form id="sendForm" class="mb-3" action="<?= url_to('magic-link') ?>" method="post">
<?= csrf_field() ?>
<div class="mb-3">
<label for="floatingEmailInput" class="form-label"><?= lang('Auth.email') ?></label>
<input
type="email"
class="form-control"
id="floatingEmailInput"
name="email"
inputmode="email"
placeholder="<?= lang('Auth.email') ?>"
value="<?= old('email', auth()->user()->email ?? null) ?>"
required
autofocus
/>
</div>
<button class="btn btn-primary d-grid w-100"><?= lang('Auth.send') ?></button>
</form>
<div class="text-center">
<a href="<?= url_to('login') ?>" class="d-flex align-items-center justify-content-center">
<i class="ti ti-chevron-left scaleX-n1-rtl"></i>
<?= lang('Auth.backToLogin') ?>
</a>
</div>
</div>
</div>
<!-- /Forgot Password -->
</div>
</div>
<!-- / Content -->
<?= $this->endSection() ?>

View File

@ -0,0 +1,19 @@
<?= $this->extend(config('Auth')->views['layout']) ?>
<?= $this->section('title') ?><?= lang('Auth.useMagicLink') ?> <?= $this->endSection() ?>
<?= $this->section('main') ?>
<div class="container d-flex justify-content-center p-5">
<div class="card col-12 col-md-5 shadow-sm">
<div class="card-body">
<h5 class="card-title mb-5"><?= lang('Auth.useMagicLink') ?></h5>
<p><b><?= lang('Auth.checkYourEmail') ?></b></p>
<p><?= lang('Auth.magicLinkDetails', [setting('Auth.magicLinkLifetime') / 60]) ?></p>
</div>
</div>
</div>
<?= $this->endSection() ?>

View File

@ -0,0 +1,147 @@
<?= $this->extend(config('Auth')->views['layout']) ?>
<?= $this->section('title') ?><?= lang('Auth.register') ?> <?= $this->endSection() ?>
<?= $this->section('main') ?>
<!-- Content -->
<div class="authentication-wrapper authentication-cover authentication-bg">
<div class="authentication-inner row">
<!-- /Left Text -->
<div class="d-none d-lg-flex col-lg-7 p-0">
<div class="auth-cover-bg auth-cover-bg-color d-flex justify-content-center align-items-center">
<img
src="<?= site_url('themes/vuexy/img/safekat/login/auth-login-illustration-light.png') ?>"
alt="auth-register-cover"
class="img-fluid my-5 auth-illustration"
/>
<img
src="<?= site_url('themes/vuexy/img/illustrations/bg-shape-image-light.png'); ?>"
alt="auth-register-cover"
class="platform-bg"
/>
</div>
</div>
<!-- /Left Text -->
<!-- Register -->
<div class="d-flex col-12 col-lg-5 align-items-center p-sm-5 p-4">
<div class="w-px-400 mx-auto">
<!-- Logo -->
<div class="app-brand mb-4">
<a href="index.html" class="app-brand-link gap-2">
<span class="app-brand-logo">
<img src="<?= site_url('themes/vuexy/img/safekat/logos/sk-logo.png') ?>"
</span>
</a>
</div>
<!-- /Logo -->
<h3 class="mb-1 fw-bold"><?= lang('Auth.register') ?></h3>
<?php if (session('error') !== null) : ?>
<div class="alert alert-danger" role="alert"><?= session('error') ?></div>
<?php elseif (session('errors') !== null) : ?>
<div class="alert alert-danger" role="alert">
<?php if (is_array(session('errors'))) : ?>
<?php foreach (session('errors') as $error) : ?>
<?= $error ?>
<br>
<?php endforeach ?>
<?php else : ?>
<?= session('errors') ?>
<?php endif ?>
</div>
<?php endif ?>
<form id="sendForm" class="mb-3" action="<?= url_to('register') ?>" method="POST">
<?= csrf_field() ?>
<!-- Email -->
<div class="mb-3">
<label for="floatingEmailInput" class="form-label"><?= lang('Auth.email') ?></label>
<input
type="email"
class="form-control"
id="floatingEmailInput"
name="email"
inputmode="email"
autocomplete="email"
placeholder="<?= lang('Auth.email') ?>"
value="<?= old('email') ?>"
required
/>
</div>
<!-- Username -->
<div class="mb-3">
<label for="floatingUsernameInput" class="form-label"><?= lang('Auth.username') ?></label>
<input
type="text"
class="form-control"
id="floatingUsernameInput"
name="username"
inputmode="text"
autocomplete="username"
placeholder=<?= lang('Auth.username') ?>
value="<?= old('username') ?>"
required
/>
</div>
<!-- Password -->
<div class="mb-3 form-password-toggle">
<label class="form-label" for="floatingPasswordInput"><?= lang('Auth.password') ?></label>
<div class="input-group input-group-merge">
<input
type="password"
class="form-control"
id="floatingPasswordInput"
name="password"
inputmode="text"
autocomplete="new-password"
placeholder="<?= lang('Auth.password') ?>"
onclick="pass()"
required
/>
<span class="input-group-text cursor-pointer"><i class="ti ti-eye-off"></i></span>
</div>
</div>
<!-- Password (Again) -->
<div class="mb-3 form-password-toggle">
<label class="form-label" for="floatingPasswordConfirmInput"><?= lang('Auth.passwordConfirm') ?></label>
<div class="input-group input-group-merge">
<input
type="password"
class="form-control"
id="floatingPasswordConfirmInput"
name="password_confirm"
inputmode="text"
autocomplete="new-password"
placeholder="<?= lang('Auth.passwordConfirm') ?>"
onclick="pass()"
required
/>
<span class="input-group-text cursor-pointer"><i class="ti ti-eye-off"></i></span>
</div>
</div>
<button class="btn btn-primary d-grid w-100"><?= lang('Auth.register') ?></button>
</form>
<p class="text-center"><?= lang('Auth.haveAccount') ?>
<a href="<?= url_to('login') ?>">
<span><?= lang('Auth.login') ?></span>
</a>
</p>
</div>
</div>
<!-- /Register -->
</div>
</div>
<!-- / Content -->
<?= $this->endSection() ?>