From 81ef01dc016db99e7b1856e611bbea1c472cf027 Mon Sep 17 00:00:00 2001
From: imnavajas
Date: Sun, 7 May 2023 22:10:35 +0200
Subject: [PATCH] Added login forms and styles initial version.
---
ci4/app/Config/App.php | 2 +-
ci4/app/Controllers/Settings.php | 2 +-
ci4/app/Filters/LoginAuthFilter.php | 2 +-
ci4/app/Language/en/App.php | 3 +-
ci4/app/Language/es/App.php | 5 +-
.../vuexy/form/login/forgot_password.php | 117 +++++++----
.../themes/backend/vuexy/form/login/index.php | 190 ++++++++++-------
.../vuexy/form/login/password_recovery.php | 123 +++++++----
.../backend/vuexy/form/login/signup.php | 195 +++++++++---------
.../themes/backend/vuexy/login/footer.php | 29 ++-
.../themes/backend/vuexy/login/header.php | 103 +++++++--
httpdocs/.htaccess | 4 +-
12 files changed, 502 insertions(+), 273 deletions(-)
diff --git a/ci4/app/Config/App.php b/ci4/app/Config/App.php
index 02941e06..ac64b6bf 100644
--- a/ci4/app/Config/App.php
+++ b/ci4/app/Config/App.php
@@ -70,7 +70,7 @@ class App extends BaseConfig
*
* @var string
*/
- public $defaultLocale = 'en';
+ public $defaultLocale = 'es';
/**
* --------------------------------------------------------------------------
diff --git a/ci4/app/Controllers/Settings.php b/ci4/app/Controllers/Settings.php
index 7dd8aa43..66abf407 100644
--- a/ci4/app/Controllers/Settings.php
+++ b/ci4/app/Controllers/Settings.php
@@ -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{
diff --git a/ci4/app/Filters/LoginAuthFilter.php b/ci4/app/Filters/LoginAuthFilter.php
index f74bff93..a611abfe 100644
--- a/ci4/app/Filters/LoginAuthFilter.php
+++ b/ci4/app/Filters/LoginAuthFilter.php
@@ -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');
}
}
}
\ No newline at end of file
diff --git a/ci4/app/Language/en/App.php b/ci4/app/Language/en/App.php
index 120021fb..28c9921d 100644
--- a/ci4/app/Language/en/App.php
+++ b/ci4/app/Language/en/App.php
@@ -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",
diff --git a/ci4/app/Language/es/App.php b/ci4/app/Language/es/App.php
index 4646ffc3..ef34385a 100644
--- a/ci4/app/Language/es/App.php
+++ b/ci4/app/Language/es/App.php
@@ -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",
diff --git a/ci4/app/Views/themes/backend/vuexy/form/login/forgot_password.php b/ci4/app/Views/themes/backend/vuexy/form/login/forgot_password.php
index 6976dca2..5d35ab3b 100644
--- a/ci4/app/Views/themes/backend/vuexy/form/login/forgot_password.php
+++ b/ci4/app/Views/themes/backend/vuexy/form/login/forgot_password.php
@@ -1,44 +1,83 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
?>)
+
+
; ?>)
+
+
+
+
+
+
+
+
+
+
+
= lang("App.login_title_forgot_password") ?> 🔒
+
Enter your email and we'll send you instructions to reset your password
+ = formAlert() ?>
+
+
+
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/ci4/app/Views/themes/backend/vuexy/form/login/index.php b/ci4/app/Views/themes/backend/vuexy/form/login/index.php
index 5cb876d7..91307236 100644
--- a/ci4/app/Views/themes/backend/vuexy/form/login/index.php
+++ b/ci4/app/Views/themes/backend/vuexy/form/login/index.php
@@ -1,79 +1,117 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
?>)
+
+
+
+
+
+
+
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/ci4/app/Views/themes/backend/vuexy/form/login/password_recovery.php b/ci4/app/Views/themes/backend/vuexy/form/login/password_recovery.php
index a12707b6..11a9348d 100644
--- a/ci4/app/Views/themes/backend/vuexy/form/login/password_recovery.php
+++ b/ci4/app/Views/themes/backend/vuexy/form/login/password_recovery.php
@@ -1,39 +1,90 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
; ?>)
+
+
+
+
+
+
+
+
+
+
+
+
= lang("App.login_title_recovery") ?> 🔒
+
for =$user??''?>
+ = formAlert() ?>
+
+
+
+
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/ci4/app/Views/themes/backend/vuexy/form/login/signup.php b/ci4/app/Views/themes/backend/vuexy/form/login/signup.php
index 54410d4c..0eec9e81 100644
--- a/ci4/app/Views/themes/backend/vuexy/form/login/signup.php
+++ b/ci4/app/Views/themes/backend/vuexy/form/login/signup.php
@@ -1,103 +1,106 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
; ?>)
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
= toastAlert() ?>
\ No newline at end of file
+
\ No newline at end of file
diff --git a/httpdocs/.htaccess b/httpdocs/.htaccess
index a5d6c2a5..a4d40264 100644
--- a/httpdocs/.htaccess
+++ b/httpdocs/.htaccess
@@ -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.
- Options +FollowSymlinks
+ # Options +FollowSymlinks
RewriteEngine On
# If you installed CodeIgniter in a subfolder, you will need to
diff --git a/ci4/app/Views/themes/backend/vuexy/login/header.php b/ci4/app/Views/themes/backend/vuexy/login/header.php
index 108a3fee..6be1d03e 100644
--- a/ci4/app/Views/themes/backend/vuexy/login/header.php
+++ b/ci4/app/Views/themes/backend/vuexy/login/header.php
@@ -1,28 +1,101 @@
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 "";
}
?>
-
+
+
+