mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Added login forms and styles initial version.
This commit is contained in:
@ -70,7 +70,7 @@ class App extends BaseConfig
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $defaultLocale = 'en';
|
||||
public $defaultLocale = 'es';
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
|
||||
@ -117,7 +117,7 @@ class Settings extends BaseController
|
||||
$this->settings_model->save($listPost);
|
||||
$settings = $this->settings_model->first()??[];
|
||||
$session->set('settings', $settings);
|
||||
$session->set('lang', $settings['default_language'] ?? 'en');
|
||||
$session->set('lang', $settings['default_language'] ?? 'es');
|
||||
$session->setFlashdata('sweet', ['success',lang("App.settings_alert_add")]);
|
||||
return redirect()->to('/settings');
|
||||
} else{
|
||||
|
||||
@ -182,7 +182,7 @@ class LoginAuthFilter implements FilterInterface
|
||||
$settings = $settingsBase->first()??[];
|
||||
$session->set('settings', $settings);
|
||||
if(empty($session->get('lang'))) {
|
||||
$session->set('lang', $settings['default_language'] ?? 'en');
|
||||
$session->set('lang', $settings['default_language'] ?? 'es');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -30,7 +30,8 @@ return [
|
||||
"global_pdf" => "PDF",
|
||||
|
||||
// LOGIN - Index
|
||||
"login_title" => "Sign in to your account",
|
||||
"login_title" => "Welcome to Safekat!",
|
||||
"login_subtitle" => "Sign in to your account",
|
||||
"login_email" => "Email",
|
||||
"login_email_ph" => "Type your email",
|
||||
"login_password" => "Password",
|
||||
|
||||
@ -24,13 +24,14 @@ return [
|
||||
"global_disable" => "Desactivar",
|
||||
"global_active" => "Activo",
|
||||
"global_inactive" => "Inactivo",
|
||||
"global_copy" => "Dupdo",
|
||||
"global_copy" => "Copiar",
|
||||
"global_print" => "Impresión",
|
||||
"global_excel" => "Excel",
|
||||
"global_pdf" => "PDF",
|
||||
|
||||
// LOGIN - Index
|
||||
"login_title" => "Iniciar sesión en su cuenta",
|
||||
"login_title" => "¡Bienvenido a Safekat!",
|
||||
"login_subtitle" => "Iniciar sesión en su cuenta",
|
||||
"login_email" => "Correo Electrónico",
|
||||
"login_email_ph" => "Escriba su correo electrónico",
|
||||
"login_password" => "Contraseña",
|
||||
|
||||
@ -1,44 +1,83 @@
|
||||
<div class="authincation h-100">
|
||||
<div class="container-fluid h-100">
|
||||
<div class="row justify-content-center h-100 align-items-center">
|
||||
<div class="col-md-4">
|
||||
<div class="authincation-content">
|
||||
<div class="row no-gutters">
|
||||
<div class="col-xl-12">
|
||||
<div class="auth-form">
|
||||
<h4 class="text-center mb-4"><?= lang("App.login_title_forgot_password") ?></h4>
|
||||
<?= formAlert() ?>
|
||||
<form action="<?=site_url("integration/reset_password")?>" id="sendForm" method="post">
|
||||
<?= csrf_field() ?>
|
||||
<div class="form-group">
|
||||
<label><strong><?= lang("App.login_email") ?></strong></label>
|
||||
<input type="email" name="email" id="email" placeholder="<?= lang("App.login_email_ph") ?>" class="form-control" value="">
|
||||
</div>
|
||||
<?php if($settings['captcha_recovery']??false): ?>
|
||||
<?php if($settings['captcha_gateway'] == 'recaptcha'): ?>
|
||||
<div class="text-center mt-2">
|
||||
<div class="g-recaptcha" style="display: inline-block" data-sitekey="<?=$settings['captcha_site_key']??''?>"></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if($settings['captcha_gateway'] == 'hcaptcha'): ?>
|
||||
<div class="text-center mt-2">
|
||||
<div class="h-captcha" style="display: inline-block" data-sitekey="<?=$settings['captcha_site_key']??''?>"></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<div class="text-center">
|
||||
<button type="button" class="btn btn-primary btn-block" onclick="load()"><?= lang("App.login_request") ?></button>
|
||||
</div>
|
||||
<div class="text-center mt-1">
|
||||
<button type="button" class="btn btn-dark btn-block" onclick="window.location.href = '<?=site_url("login")?>';"><?= lang("App.login_come_back") ?></button>
|
||||
</div>
|
||||
<p class="text-primary" id="msg" style="display: none;"><i class="fas fa-spinner fa-pulse"></i> <?= lang("App.login_wait") ?></p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 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/illustrations/auth-forgot-password-illustration-light.png')?>"
|
||||
alt="auth-forgot-password-cover"
|
||||
class="img-fluid my-5 auth-illustration"
|
||||
data-app-light-img="illustrations/auth-forgot-password-illustration-light.png"
|
||||
data-app-dark-img="illustrations/auth-forgot-password-illustration-dark.png"
|
||||
/>
|
||||
|
||||
<img
|
||||
src="<?=site_url('themes/vuexy/img/illustrations/bg-shape-image-light.png'); ?>"
|
||||
alt="auth-forgot-password-cover"
|
||||
class="platform-bg"
|
||||
data-app-light-img="illustrations/bg-shape-image-light.png"
|
||||
data-app-dark-img="illustrations/bg-shape-image-dark.png"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Left Text -->
|
||||
|
||||
<!-- Forgot Password -->
|
||||
<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/branding/logo.png')?>"
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<!-- /Logo -->
|
||||
<h3 class="mb-1 fw-bold"><?= lang("App.login_title_forgot_password") ?> 🔒</h3>
|
||||
<p class="mb-4">Enter your email and we'll send you instructions to reset your password</p>
|
||||
<?= formAlert() ?>
|
||||
<form id="sendForm" class="mb-3" action="<?=site_url("integration/reset_password")?>" method="post">
|
||||
<?= csrf_field() ?>
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label"><?= lang("App.login_email") ?></label>
|
||||
<input
|
||||
type="email"
|
||||
class="form-control"
|
||||
id="email"
|
||||
name="email"
|
||||
placeholder="<?= lang("App.login_email_ph") ?>"
|
||||
autofocus
|
||||
/>
|
||||
</div>
|
||||
<?php
|
||||
// TODO IMN remove recaptcha options?
|
||||
if($settings['captcha_recovery']??false): ?>
|
||||
<?php if($settings['captcha_gateway'] == 'recaptcha'): ?>
|
||||
<div class="text-center mt-2">
|
||||
<div class="g-recaptcha" style="display: inline-block" data-sitekey="<?=$settings['captcha_site_key']??''?>"></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if($settings['captcha_gateway'] == 'hcaptcha'): ?>
|
||||
<div class="text-center mt-2">
|
||||
<div class="h-captcha" style="display: inline-block" data-sitekey="<?=$settings['captcha_site_key']??''?>"></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<button class="btn btn-primary d-grid w-100"><?= lang("App.login_request") ?></button>
|
||||
</form>
|
||||
<div class="text-center">
|
||||
<a href="<?=site_url("login")?>" class="d-flex align-items-center justify-content-center">
|
||||
<i class="ti ti-chevron-left scaleX-n1-rtl"></i>
|
||||
<?= lang("App.login_come_back") ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Forgot Password -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- / Content -->
|
||||
@ -1,79 +1,117 @@
|
||||
<div class="authincation h-100">
|
||||
<div class="container-fluid h-100">
|
||||
<div class="row justify-content-center h-100 align-items-center">
|
||||
<div class="col-md-4">
|
||||
<div class="authincation-content">
|
||||
<div class="row no-gutters">
|
||||
<div class="col-xl-12">
|
||||
<div class="auth-form">
|
||||
<a href="<?= site_url('login'); ?>" class="justify-content-center mb-4"></a>
|
||||
<h4 class="text-center mb-2">
|
||||
<img src="<?= site_url('themes/focus2/images/logo-full.png'); ?>" alt=""><br>
|
||||
</h4>
|
||||
<h4 class="text-center mb-4">
|
||||
<?= lang("App.login_title") ?>
|
||||
</h4>
|
||||
<div class="row mb-4">
|
||||
<div class="col-xl-12 text-center">
|
||||
<?php foreach($oauth??[] as $item): ?>
|
||||
<a href="<?= site_url('oauth/'.$item['provider']); ?>" class="btn <?=$item['btn_class'] ?> mt-1 mr-1"><i class="<?=$item['icon_class']?> <?=$item['show_text']?'mr-2':'fa-2x' ?> "></i><?=$item['show_text']?$item['btn_text']:'' ?></a>
|
||||
<?php endforeach; ?>
|
||||
</div><i class="fa-2x"></i>
|
||||
</div>
|
||||
<form action="<?= site_url('login/authenticate'); ?>" method="post">
|
||||
<?= csrf_field() ?>
|
||||
<div class="form-group">
|
||||
<label><strong><?= lang("App.login_email") ?></strong></label>
|
||||
<input type="email" id="email" name="email" placeholder="<?= lang("App.login_email_ph") ?>" class="form-control" value="">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label><strong><?= lang("App.login_password") ?></strong></label>
|
||||
<div class="input-group">
|
||||
<input type="password" id="password" name="password" placeholder="<?= lang("App.login_password_ph") ?>" class="form-control" value="">
|
||||
<div class="input-group-append">
|
||||
<button type="button" class="btn btn-dark" id="btn_pass" onclick="pass()"><i class="far fa-eye"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row d-flex justify-content-between mt-4 mb-2">
|
||||
<div class="form-group">
|
||||
<?php if($settings['remember_me']??false): ?>
|
||||
<div class="custom-control custom-switch ml-2">
|
||||
<input type="checkbox" id="remember" name="remember" class="custom-control-input">
|
||||
<label for="remember" class="custom-control-label"><?= lang("App.login_remember_me") ?></label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<?php if($settings['forgot_password']??false): ?>
|
||||
<a href="<?= site_url('login/forgot_password'); ?>"><?= lang("App.login_forgot_password") ?></a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<button type="submit" class="btn btn-access btn-primary btn-block"><?= lang("App.login_access") ?></button>
|
||||
</div>
|
||||
<?php if($settings['captcha_login']??false): ?>
|
||||
<?php if($settings['captcha_gateway'] == 'recaptcha'): ?>
|
||||
<div class="text-center mt-2">
|
||||
<div class="g-recaptcha" style="display: inline-block" data-sitekey="<?=$settings['captcha_site_key']??''?>"></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if($settings['captcha_gateway'] == 'hcaptcha'): ?>
|
||||
<div class="text-center mt-2">
|
||||
<div class="h-captcha" style="display: inline-block" data-sitekey="<?=$settings['captcha_site_key']??''?>"></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($settings['registration']??false): ?>
|
||||
<h6 class="text-center mt-4 text-dark"><?= lang("App.login_signup_desc") ?> <a href="<?= site_url('login/signup'); ?>" class="text-primary"><?= lang("App.login_signup") ?></a></h6>
|
||||
<?php endif; ?>
|
||||
<!-- 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/illustrations/auth-login-illustration-light.png')?>"
|
||||
alt="auth-login-cover"
|
||||
class="img-fluid my-5 auth-illustration"
|
||||
data-app-light-img="illustrations/auth-login-illustration-light.png"
|
||||
data-app-dark-img="illustrations/auth-login-illustration-dark.png"
|
||||
/>
|
||||
|
||||
<img
|
||||
src="<?=site_url('themes/vuexy/img/illustrations/bg-shape-image-light.png'); ?>"
|
||||
alt="auth-login-cover"
|
||||
class="platform-bg"
|
||||
data-app-light-img="illustrations/bg-shape-image-light.png"
|
||||
data-app-dark-img="illustrations/bg-shape-image-dark.png"
|
||||
/>
|
||||
</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/branding/logo.png')?>"
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<!-- /Logo -->
|
||||
<h3 class="mb-1 fw-bold"><?= lang("App.login_title") ?> 👋</h3>
|
||||
<p class="mb-4"><?= lang("App.login_subtitle") ?></p>
|
||||
|
||||
<form id="formAuthentication" class="mb-3" action="<?= site_url('login/authenticate'); ?>" method="POST">
|
||||
<?= csrf_field() ?>
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label"><?= lang("App.login_email") ?></label>
|
||||
<input
|
||||
type="email"
|
||||
class="form-control"
|
||||
id="email"
|
||||
name="email"
|
||||
placeholder="<?= lang("App.login_email_ph") ?>"
|
||||
autofocus
|
||||
/>
|
||||
</div>
|
||||
<div class="mb-3 form-password-toggle">
|
||||
<div class="d-flex justify-content-between">
|
||||
<label class="form-label" for="password"><?= lang("App.login_password") ?></label>
|
||||
<?php if($settings['forgot_password']??false): ?>
|
||||
<a href="<?= site_url('login/forgot_password'); ?>">
|
||||
<small><?= lang("App.login_forgot_password") ?></small>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="input-group input-group-merge">
|
||||
<input
|
||||
type="password"
|
||||
id="password"
|
||||
class="form-control"
|
||||
name="password"
|
||||
placeholder="<?= lang("App.login_password_ph") ?>"
|
||||
aria-describedby="password"
|
||||
onclick="pass()"
|
||||
/>
|
||||
<span class="input-group-text cursor-pointer"><i class="ti ti-eye-off"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($settings['remember_me']??false): ?>
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" id="remember" name="remember"" />
|
||||
<label class="form-check-label" for="remember"> <?= lang("App.login_remember_me") ?> </label>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<button class="btn btn-primary d-grid w-100"><?= lang("App.login_access") ?></button>
|
||||
<?php
|
||||
// IMN OJO, lo mismo eliminar TODO
|
||||
if($settings['captcha_login']??false): ?>
|
||||
<?php if($settings['captcha_gateway'] == 'recaptcha'): ?>
|
||||
<div class="text-center mt-2">
|
||||
<div class="g-recaptcha" style="display: inline-block" data-sitekey="<?=$settings['captcha_site_key']??''?>"></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if($settings['captcha_gateway'] == 'hcaptcha'): ?>
|
||||
<div class="text-center mt-2">
|
||||
<div class="h-captcha" style="display: inline-block" data-sitekey="<?=$settings['captcha_site_key']??''?>"></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
|
||||
<?php if($settings['registration']??false): ?>
|
||||
<p class="text-center">
|
||||
<span><?= lang("App.login_signup_desc") ?></span>
|
||||
<a href="<?= site_url('login/signup'); ?>">
|
||||
<span><?= lang("App.login_signup") ?></span>
|
||||
</a>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Login -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- / Content -->
|
||||
@ -1,39 +1,90 @@
|
||||
<div class="authincation h-100">
|
||||
<div class="container-fluid h-100">
|
||||
<div class="row justify-content-center h-100 align-items-center">
|
||||
<div class="col-md-4">
|
||||
<div class="authincation-content">
|
||||
<div class="row no-gutters">
|
||||
<div class="col-xl-12">
|
||||
<div class="auth-form">
|
||||
<h4 class="text-center mb-4"><?= lang("App.login_title_recovery") ?></h4>
|
||||
<?= formAlert() ?>
|
||||
<form action="<?=site_url("login/recovery_store")?>" id="sendForm" method="post">
|
||||
<?= csrf_field() ?>
|
||||
<input type="hidden" name="token" value="<?=$token??''?>">
|
||||
<input type="hidden" name="user" value="<?=$user??''?>">
|
||||
<div class="form-group">
|
||||
<label><strong><?= lang("App.login_new_password") ?></strong></label>
|
||||
<div class="input-group">
|
||||
<input type="password" id="password" name="password" placeholder="<?= lang("App.login_password_ph") ?>" class="form-control">
|
||||
<div class="input-group-append">
|
||||
<button type="button" class="btn btn-dark" id="btn_pass" onclick="pass()"><i class="far fa-eye"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<button type="button" class="btn btn-primary btn-block" onclick="load()"><?= lang("App.login_btn_recovery") ?></button>
|
||||
</div>
|
||||
<div class="text-center mt-1">
|
||||
<button type="button" class="btn btn-dark btn-block" onclick="window.location.href = '<?=site_url("login")?>';"><?= lang("App.login_come_back") ?></button>
|
||||
</div>
|
||||
<p class="text-primary" id="msg" style="display: none;"><i class="fas fa-spinner fa-pulse"></i> <?= lang("App.login_wait") ?></p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 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/illustrations/auth-reset-password-illustration-light.png'); ?>"
|
||||
alt="auth-reset-password-cover"
|
||||
class="img-fluid my-5 auth-illustration"
|
||||
data-app-light-img="illustrations/auth-reset-password-illustration-light.png"
|
||||
data-app-dark-img="illustrations/auth-reset-password-illustration-dark.png"
|
||||
/>
|
||||
|
||||
<img
|
||||
src="<?=site_url('themes/vuexy/img/illustrations/bg-shape-image-light.png'); ?>"
|
||||
alt="auth-reset-password-cover"
|
||||
class="platform-bg"
|
||||
data-app-light-img="illustrations/bg-shape-image-light.png"
|
||||
data-app-dark-img="illustrations/bg-shape-image-dark.png"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Left Text -->
|
||||
|
||||
<!-- Reset Password -->
|
||||
<div class="d-flex col-12 col-lg-5 align-items-center p-4 p-sm-5">
|
||||
<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/branding/logo.png')?>"
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<!-- /Logo -->
|
||||
|
||||
<h3 class="mb-1 fw-bold"><?= lang("App.login_title_recovery") ?> 🔒</h3>
|
||||
<p class="mb-4">for <span class="fw-bold"><?=$user??''?></span></p>
|
||||
<?= formAlert() ?>
|
||||
<form id="sendForm" class="mb-3" action="<?=site_url("login/recovery_store")?>" method="post">
|
||||
<?= csrf_field() ?>
|
||||
<input type="hidden" name="token" value="<?=$token??''?>">
|
||||
<input type="hidden" name="user" value="<?=$user??''?>">
|
||||
<div class="mb-3 form-password-toggle">
|
||||
<label class="form-label" for="password"><?= lang("App.login_new_password") ?></label>
|
||||
<div class="input-group input-group-merge">
|
||||
<input
|
||||
type="password"
|
||||
id="password"
|
||||
class="form-control"
|
||||
name="password"
|
||||
placeholder="<?= lang("App.login_password_ph") ?>"
|
||||
aria-describedby="password"
|
||||
onclick="pass()"
|
||||
/>
|
||||
<span class="input-group-text cursor-pointer"><i class="ti ti-eye-off"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 form-password-toggle">
|
||||
<label class="form-label" for="confirm-password">Confirm Password</label>
|
||||
<div class="input-group input-group-merge">
|
||||
<input
|
||||
type="password"
|
||||
id="confirm-password"
|
||||
class="form-control"
|
||||
name="confirm-password"
|
||||
placeholder="············"
|
||||
aria-describedby="password"
|
||||
/>
|
||||
<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 mb-3"><?= lang("App.login_btn_recovery") ?></button>
|
||||
<div class="text-center">
|
||||
<a href="<?=site_url("login")?>">
|
||||
<i class="ti ti-chevron-left scaleX-n1-rtl"></i>
|
||||
<?= lang("App.login_come_back") ?>
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Reset Password -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- / Content -->
|
||||
@ -1,103 +1,106 @@
|
||||
<div class="authincation h-100">
|
||||
<div class="container-fluid h-100">
|
||||
<div class="row justify-content-center h-100 align-items-center">
|
||||
<div class="col-md-4">
|
||||
<div class="authincation-content">
|
||||
<div class="row no-gutters">
|
||||
<div class="col-xl-12">
|
||||
<div class="auth-form">
|
||||
<h4 class="text-center mb-4"><?= lang("App.login_title_signup") ?></h4>
|
||||
<?= formAlert() ?>
|
||||
<form action="<?=site_url("login/store")?>" id="sendForm" method="post">
|
||||
<?= csrf_field() ?>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group">
|
||||
<label><strong><?= lang("App.login_first_name") ?></strong></label>
|
||||
<input type="text" name="first_name" id="first_name" placeholder="<?= lang("App.login_first_name_ph") ?>" class="form-control" value="<?= set_value('first_name') ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group">
|
||||
<label><strong><?= lang("App.login_last_name") ?></strong></label>
|
||||
<input type="text" name="last_name" id="last_name" placeholder="<?= lang("App.login_last_name_ph") ?>" class="form-control" value="<?= set_value('last_name') ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<div class="form-group">
|
||||
<label><strong><?= lang("App.login_email") ?></strong></label>
|
||||
<input type="email" name="email" id="email" placeholder="<?= lang("App.login_email_ph") ?>" class="form-control" value="<?= set_value('email') ?>">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<div class="form-group">
|
||||
<label><strong><?= lang("App.login_password") ?></strong></label>
|
||||
<div class="input-group">
|
||||
<input type="password" id="password" name="password" placeholder="<?= lang("App.login_password_ph") ?>" class="form-control" value="<?= set_value('password') ?>">
|
||||
<div class="input-group-append">
|
||||
<button type="button" class="btn btn-dark" id="btn_pass" onclick="pass()"><i class="far fa-eye"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($settings['terms_conditions']??false): ?>
|
||||
<div class="col-lg-12 d-flex justify-content-between">
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch ml-2">
|
||||
<input type="checkbox" id="accept" name="accept" class="custom-control-input" <?= set_value('accept')=='on'?'checked':''?>>
|
||||
<label for="accept" class="custom-control-label"><?= lang("App.login_accept_terms") ?></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a href="javascript:void(0)" data-toggle="modal" data-target=".terms-conditions-modal-lg"><?= lang("App.login_read_terms") ?></a>
|
||||
</div>
|
||||
<div class="modal fade terms-conditions-modal-lg" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><?= lang("App.login_terms_use") ?></h5>
|
||||
<button type="button" class="close" data-dismiss="modal"><span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body"><?= html_entity_decode($settings['terms_conditions_text']??'');?></div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-dark" data-dismiss="modal"><?= lang("App.login_closed") ?></button>
|
||||
<button type="button" class="btn btn-primary" onclick="accepted()"><?= lang("App.login_accept") ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if($settings['captcha_register']??false): ?>
|
||||
<?php if($settings['captcha_gateway'] == 'recaptcha'): ?>
|
||||
<div class="text-center mt-2">
|
||||
<div class="g-recaptcha" style="display: inline-block" data-sitekey="<?=$settings['captcha_site_key']??''?>"></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if($settings['captcha_gateway'] == 'hcaptcha'): ?>
|
||||
<div class="text-center mt-2">
|
||||
<div class="h-captcha" style="display: inline-block" data-sitekey="<?=$settings['captcha_site_key']??''?>"></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<div class="text-center">
|
||||
<button type="button" class="btn btn-primary btn-block" onclick="validate()"><?= lang("App.login_register") ?></button>
|
||||
</div>
|
||||
<div class="text-center mt-1">
|
||||
<button type="button" class="btn btn-dark btn-block" onclick="window.location.href = '<?=site_url("login")?>';"><?= lang("App.login_come_back") ?></button>
|
||||
</div>
|
||||
<p class="text-primary" id="msg" style="display: none;"><i class="fas fa-spinner fa-pulse"></i> <?= lang("App.login_wait") ?></p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 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/illustrations/auth-register-illustration-light.png'); ?>"
|
||||
alt="auth-register-cover"
|
||||
class="img-fluid my-5 auth-illustration"
|
||||
data-app-light-img="illustrations/auth-register-illustration-light.png"
|
||||
data-app-dark-img="illustrations/auth-register-illustration-dark.png"
|
||||
/>
|
||||
|
||||
<img
|
||||
src="<?=site_url('themes/vuexy/img/illustrations/bg-shape-image-light.png'); ?>"
|
||||
alt="auth-register-cover"
|
||||
class="platform-bg"
|
||||
data-app-light-img="illustrations/bg-shape-image-light.png"
|
||||
data-app-dark-img="illustrations/bg-shape-image-dark.png"
|
||||
/>
|
||||
</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/branding/logo.png')?>"
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
<!-- /Logo -->
|
||||
<h3 class="mb-1 fw-bold"><?= lang("App.login_title_signup") ?> 🚀</h3>
|
||||
<p class="mb-4">Make your app management easy and fun!</p>
|
||||
|
||||
<?= formAlert() ?>
|
||||
<form id="sendForm" class="mb-3" action="<?=site_url("login/store")?>" method="POST">
|
||||
<?= csrf_field() ?>
|
||||
<div class="mb-3">
|
||||
<label for="username" class="form-label">Username</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="username"
|
||||
name="username"
|
||||
placeholder="Enter your username"
|
||||
autofocus
|
||||
/>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="email" class="form-label"><?= lang("App.login_email") ?></label>
|
||||
<input type="text" class="form-control" id="email" name="email" placeholder="<?= lang("App.login_email_ph") ?>" />
|
||||
</div>
|
||||
<div class="mb-3 form-password-toggle">
|
||||
<label class="form-label" for="password"><?= lang("App.login_password") ?></label>
|
||||
<div class="input-group input-group-merge">
|
||||
<input
|
||||
type="password"
|
||||
id="btn_pass"
|
||||
class="form-control"
|
||||
name="password"
|
||||
placeholder="<?= lang("App.login_password_ph") ?>"
|
||||
aria-describedby="password"
|
||||
onclick="pass()"
|
||||
/>
|
||||
<span class="input-group-text cursor-pointer"><i class="ti ti-eye-off"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($settings['terms_conditions']??false): ?>
|
||||
<div class="mb-3">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" id="accept" name="accept" <?= set_value('accept')=='on'?'checked':''?> />
|
||||
<label class="form-check-label" for="accept">
|
||||
I agree to
|
||||
<a href="javascript:void(0);"><?= lang("App.login_accept_terms") ?></a>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<button class="btn btn-primary d-grid w-100" onclick="validate()"><?= lang("App.login_register") ?></button>
|
||||
</form>
|
||||
|
||||
<p class="text-center">
|
||||
<a href="<?=site_url("login")?>">
|
||||
<span><?= lang("App.login_come_back") ?></span>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Register -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- / Content -->
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
function validate(){
|
||||
|
||||
@ -1,7 +1,30 @@
|
||||
<!-- Required vendors -->
|
||||
<script src="<?= site_url('themes/focus2/vendor/global/global.min.js'); ?>"></script>
|
||||
<script src="<?= site_url('themes/focus2/js/quixnav-init.js'); ?>"></script>
|
||||
<script src="<?= site_url('themes/focus2/vendor/toastr/js/toastr.min.js'); ?>"></script>
|
||||
<!-- Core JS -->
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/jquery/jquery.js') ?>"></script>
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/popper/popper.js') ?>"></script>
|
||||
<script src="<?= site_url('themes/vuexy/vendor/js/bootstrap.js') ?>"></script>
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/perfect-scrollbar/perfect-scrollbar.js') ?>"></script>
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/node-waves/node-waves.js') ?>"></script>
|
||||
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/hammer/hammer.js') ?>"></script>
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/i18n/i18n.js') ?>"></script>
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/typeahead-js/typeahead.js') ?>"></script>
|
||||
|
||||
<script src="<?= site_url('themes/vuexy/vendor/js/menu.js') ?>"></script>
|
||||
|
||||
|
||||
<!-- Vendors JS -->
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/formvalidation/dist/js/FormValidation.min.js') ?>"></script>
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/formvalidation/dist/js/plugins/Bootstrap5.min.js') ?>"></script>
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/formvalidation/dist/js/plugins/AutoFocus.min.js') ?>"></script>
|
||||
|
||||
<!-- Main JS -->
|
||||
<script src="<?= site_url('themes/vuexy/js/main.js') ?>"></script>
|
||||
|
||||
<!-- Page JS -->
|
||||
<script src="<?= site_url('themes/vuexy/js/pages-auth.js') ?>"></script>
|
||||
|
||||
<!-- Custom JS -->
|
||||
<script src="<?= site_url('assets/js/login.js'); ?>"></script>
|
||||
<?= toastAlert() ?>
|
||||
</body>
|
||||
|
||||
@ -1,28 +1,101 @@
|
||||
<?php
|
||||
$session = session();
|
||||
$token = $session->get('token')??'';
|
||||
$tfa = $session->get('tfa')??false;
|
||||
$token = $session->get('token') ?? '';
|
||||
$tfa = $session->get('tfa') ?? false;
|
||||
$settings = $session->get('settings');
|
||||
if (!empty($token) && $tfa == false) {
|
||||
echo "<script>window.location.href = '/'; </script>";
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?= $settings['default_language']??'en'=='pt' ? 'pt-br' : $settings['default_language']??'en' ?>" class="h-100">
|
||||
|
||||
<html
|
||||
lang="<?= $settings['default_language'] ?? 'es' == 'pt' ? 'pt-br' : $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 http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title><?= $settings['title']??'' ?><?= empty($title??'') ? '' : ' - ' . $title?></title>
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="<?= site_url('themes/focus2/images/favicon.png'); ?>">
|
||||
<link href="<?= site_url('themes/focus2/vendor/toastr/css/toastr.min.css'); ?>" rel="stylesheet">
|
||||
<link href="<?= site_url('themes/focus2/css/style.css'); ?>" rel="stylesheet">
|
||||
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"
|
||||
/>
|
||||
|
||||
<title><?= $settings['title'] ?? '' ?><?= empty($title ?? '') ? '' : ' - ' . $title ?></title>
|
||||
|
||||
<meta name="description" content=""/>
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" type="image/x-icon" href="<?= site_url('themes/vuexy/img/favicon/favicon.ico') ?>"/>
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="<?= site_url('themes/vuexy/img/favicon/apple-icon-57x57.png') ?>">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="<?= site_url('themes/vuexy/img/favicon/apple-icon-60x60.png') ?>">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="<?= site_url('themes/vuexy/img/favicon/apple-icon-72x72.png') ?>">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="<?= site_url('themes/vuexy/img/favicon/apple-icon-76x76.png') ?>">
|
||||
<link rel="apple-touch-icon" sizes="114x114"
|
||||
href="<?= site_url('themes/vuexy/img/favicon/apple-icon-114x114.png') ?>">
|
||||
<link rel="apple-touch-icon" sizes="120x120"
|
||||
href="<?= site_url('themes/vuexy/img/favicon/apple-icon-120x120.png') ?>">
|
||||
<link rel="apple-touch-icon" sizes="144x144"
|
||||
href="<?= site_url('themes/vuexy/img/favicon/apple-icon-144x144.png') ?>">
|
||||
<link rel="apple-touch-icon" sizes="152x152"
|
||||
href="<?= site_url('themes/vuexy/img/favicon/apple-icon-152x152.png') ?>">
|
||||
<link rel="apple-touch-icon" sizes="180x180"
|
||||
href="<?= site_url('themes/vuexy/img/favicon/apple-icon-180x180.png') ?>">
|
||||
<link rel="icon" type="image/png" sizes="192x192"
|
||||
href="<?= site_url('themes/vuexy/img/favicon/android-icon-192x192.png') ?>">
|
||||
<link rel="icon" type="image/png" sizes="32x32"
|
||||
href="<?= site_url('themes/vuexy/img/favicon/favicon-32x32.png') ?>">
|
||||
<link rel="icon" type="image/png" sizes="96x96"
|
||||
href="<?= site_url('themes/vuexy/img/favicon/favicon-96x96.png') ?>">
|
||||
<link rel="icon" type="image/png" sizes="16x16"
|
||||
href="<?= site_url('themes/vuexy/img/favicon/favicon-16x16.png') ?>">
|
||||
<link rel="manifest" href="<?= site_url('themes/vuexy/img/favicon/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="<?= site_url('themes/vuexy/vendor/fonts/fontawesome.css') ?>"/>
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/fonts/tabler-icons.css') ?>"/>
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/fonts/flag-icons.css') ?>"/>
|
||||
|
||||
<!-- Core CSS -->
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/css/rtl/core-dark.css') ?>"/>
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/css/rtl/theme-default-dark.css') ?>"/>
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/css/demo.css') ?>"/>
|
||||
|
||||
<!-- Vendors CSS -->
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/perfect-scrollbar/perfect-scrollbar.css') ?>"/>
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/node-waves/node-waves.css') ?>"/>
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/typeahead-js/typeahead.css') ?>"/>
|
||||
<!-- Vendor -->
|
||||
<link rel="stylesheet"
|
||||
href="<?= site_url('themes/vuexy/vendor/libs/formvalidation/dist/css/formValidation.min.css') ?>"/>
|
||||
|
||||
<!-- Page CSS -->
|
||||
<!-- Page -->
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/css/pages/page-auth.css') ?>"/>
|
||||
<!-- Helpers -->
|
||||
<script src="<?= site_url('themes/vuexy/vendor/js/helpers.js') ?>"></script>
|
||||
<script src="<?= site_url('themes/vuexy/js/config.js') ?>"></script>
|
||||
|
||||
<?php
|
||||
if($settings['captcha_gateway'] == 'recaptcha'){
|
||||
echo "<script src='https://www.google.com/recaptcha/api.js' async defer></script>";
|
||||
}else{
|
||||
echo "<script src='https://www.hCaptcha.com/1/api.js' async defer></script>";
|
||||
}
|
||||
if ($settings['captcha_gateway'] == 'recaptcha') {
|
||||
echo "<script src='https:/www.google.com/recaptcha/api.js' async defer></script>";
|
||||
} else {
|
||||
echo "<script src='https:/www.hCaptcha.com/1/api.js' async defer></script>";
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
<body class="h-100">
|
||||
<body>
|
||||
@ -1,5 +1,5 @@
|
||||
# Disable directory browsing
|
||||
Options All -Indexes
|
||||
Options -Indexes
|
||||
|
||||
# ----------------------------------------------------------------------
|
||||
# Rewrite engine
|
||||
@ -8,7 +8,7 @@ Options All -Indexes
|
||||
# Turning on the rewrite engine is necessary for the following rules and features.
|
||||
# FollowSymLinks must be enabled for this to work.
|
||||
<IfModule mod_rewrite.c>
|
||||
Options +FollowSymlinks
|
||||
# Options +FollowSymlinks
|
||||
RewriteEngine On
|
||||
|
||||
# If you installed CodeIgniter in a subfolder, you will need to
|
||||
|
||||
Reference in New Issue
Block a user