Files
dockerfluxodecaixapro/cache/twig/3d/3d802eda10b2ec604e40afd129e519f6.php
T
2026-09-01 10:46:29 -03:00

501 lines
20 KiB
PHP
Executable File

<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* auth/views/login.twig */
class __TwigTemplate_44be6b4d2ac2b550de094f1a83fa4139 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'head' => [$this, 'block_head'],
'content' => [$this, 'block_content'],
'scripts' => [$this, 'block_scripts'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "layouts/base.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$this->parent = $this->load("layouts/base.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
}
// line 3
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_title(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("auth.login_title", ["platformName" => ($context["platformName"] ?? null)]), "html", null, true);
yield from [];
}
// line 5
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_head(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
// line 6
yield "<style>
.login-container {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 20px 0;
}
.login-card {
border: none;
border-radius: 15px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
overflow: hidden;
max-width: 450px;
width: 100%;
}
.login-header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 30px 20px;
text-align: center;
}
.login-header h3 {
margin: 0;
font-weight: 600;
}
.login-body {
padding: 40px 30px;
background-color: #fff;
}
.form-floating {
margin-bottom: 20px;
}
.form-control {
border-radius: 10px;
border: 1px solid #e0e0e0;
padding: 12px 15px;
font-size: 16px;
transition: all 0.3s;
}
.form-control:focus {
border-color: #667eea;
box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}
.btn-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border: none;
border-radius: 10px;
padding: 12px;
font-weight: 600;
transition: all 0.3s;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}
.btn-link {
color: #667eea;
text-decoration: none;
font-weight: 500;
transition: all 0.3s;
}
.btn-link:hover {
color: #764ba2;
text-decoration: underline;
}
.form-check-input:checked {
background-color: #667eea;
border-color: #667eea;
}
.alert {
border-radius: 10px;
border: none;
margin-bottom: 20px;
}
.captcha-container {
background-color: #f8f9fa;
border-radius: 10px;
padding: 15px;
margin-bottom: 20px;
}
.captcha-image {
border-radius: 8px;
overflow: hidden;
display: inline-block;
}
.password-toggle {
position: absolute;
right: 15px;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
color: #6c757d;
z-index: 10;
}
</style>
";
yield from [];
}
// line 105
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_content(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
// line 106
yield "<div class=\"login-container\">
<div class=\"row justify-content-center w-100\">
<div class=\"col-lg-5\">
<div class=\"card login-card\">
<div class=\"login-header\">
<h3>";
// line 111
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("auth.login_title", ["platformName" => ($context["platformName"] ?? null)]), "html", null, true);
yield "</h3>
</div>
<div class=\"login-body\">
";
// line 114
if ((($tmp = ($context["password_reset_success"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 115
yield " <div class=\"alert alert-success\" role=\"alert\">
";
// line 116
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("auth.password_reset_success"), "html", null, true);
yield "
</div>
";
}
// line 119
yield "
";
// line 120
if ((($tmp = ($context["error"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 121
yield " <div class=\"alert alert-danger\" role=\"alert\">
";
// line 122
yield (((($context["error"] ?? null) == 1)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("auth.invalid_credentials"), "html", null, true)) : (""));
yield "
";
// line 123
yield (((($context["error"] ?? null) == 2)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("auth.account_inactive"), "html", null, true)) : (""));
yield "
";
// line 124
yield (((($context["error"] ?? null) == 3)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("auth.registration_pending"), "html", null, true)) : (""));
yield "
";
// line 125
yield (((($context["error"] ?? null) == "captcha")) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("auth.invalid_captcha"), "html", null, true)) : (""));
yield "
";
// line 126
yield (((($context["error"] ?? null) == "rate")) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("auth.too_many_attempts"), "html", null, true)) : (""));
yield "
</div>
";
}
// line 129
yield "
";
// line 130
if ((($tmp = ($context["expired"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 131
yield " <div class=\"alert alert-warning\" role=\"alert\">
";
// line 132
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("auth.session_expired"), "html", null, true);
yield "
</div>
";
}
// line 135
yield "
<form method=\"POST\" action=\"";
// line 136
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()("login"), "html", null, true);
yield "\">
";
// line 137
yield $this->env->getFunction('csrf_field')->getCallable()();
yield "
<div class=\"form-floating mb-3\">
<input type=\"email\" class=\"form-control\" id=\"email\" name=\"email\" placeholder=\"";
// line 140
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("auth.email_placeholder"), "html", null, true);
yield "\" value=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('old')->getCallable()("email"), "html", null, true);
yield "\" required>
<label for=\"email\">";
// line 141
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("auth.email"), "html", null, true);
yield "</label>
</div>
";
// line 144
yield from $this->load("components/password-field.twig", 144)->unwrap()->yield(CoreExtension::merge($context, ["id" => "password", "name" => "password", "label" => $this->env->getFunction('__')->getCallable()("auth.password"), "placeholder" => $this->env->getFunction('__')->getCallable()("auth.password_placeholder"), "required" => true]));
// line 151
yield "
";
// line 152
if ((($tmp = ($context["require_captcha_login"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 153
yield " <div class=\"captcha-container\" x-data=\"{
num1: 0,
num2: 0,
userAnswer: '',
solved: false,
generate() {
this.num1 = Math.floor(Math.random() * 10) + 1;
this.num2 = Math.floor(Math.random() * 10) + 1;
this.userAnswer = '';
this.solved = false;
},
check() {
if (parseInt(this.userAnswer) === (this.num1 + this.num2)) {
this.solved = true;
} else {
this.solved = false;
}
}
}\" x-init=\"generate()\">
<div class=\"mb-3\">
<label class=\"form-label fw-bold mb-2\">";
// line 173
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("auth.security_check"), "html", null, true);
yield "</label>
<div class=\"d-flex align-items-center gap-2\">
<div class=\"px-3 py-2 bg-white border rounded fw-bold fs-5 text-nowrap\">
<span x-text=\"num1\"></span> + <span x-text=\"num2\"></span> =
</div>
<input type=\"number\" class=\"form-control\" style=\"width: 80px;\" x-model=\"userAnswer\" @input=\"check()\" placeholder=\"?\">
<button type=\"button\" class=\"btn btn-outline-secondary btn-sm ms-1\" @click=\"generate()\" title=\"";
// line 179
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("auth.captcha_reload"), "html", null, true);
yield "\">
<i class=\"bi bi-arrow-clockwise\"></i> ↻
</button>
</div>
<div class=\"mt-2\" style=\"min-height: 24px;\">
<span x-show=\"solved\" class=\"text-success fw-bold small\">
✓ ";
// line 185
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("auth.captcha_solved"), "html", null, true);
yield "
</span>
<span x-show=\"!solved\" class=\"text-muted small\">
";
// line 188
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("auth.captcha_instruction"), "html", null, true);
yield "
</span>
</div>
</div>
<input type=\"hidden\" name=\"captcha_valid\" :value=\"solved ? '1' : ''\">
</div>
";
}
// line 195
yield "
<div class=\"form-check mb-3\">
<input class=\"form-check-input\" type=\"checkbox\" id=\"remember\" name=\"remember\">
<label class=\"form-check-label\" for=\"remember\">";
// line 198
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("auth.remember_me"), "html", null, true);
yield "</label>
</div>
<div class=\"d-grid gap-3\">
<button class=\"btn btn-primary btn-lg\" type=\"submit\">
";
// line 203
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("auth.login_button"), "html", null, true);
yield "
</button>
<a href=\"";
// line 205
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()("forgot-password"), "html", null, true);
yield "\" class=\"btn btn-link\">
";
// line 206
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("auth.forgot_password"), "html", null, true);
yield "
</a>
";
// line 208
if ((($tmp = ($context["allow_registration"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 209
yield " <a href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()("register"), "html", null, true);
yield "\" class=\"btn btn-link\">
";
// line 210
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("auth.register_button"), "html", null, true);
yield "
</a>
";
}
// line 213
yield " </div>
</form>
<div class=\"mt-3 d-grid\">
<a href=\"";
// line 217
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('url')->getCallable()("verify-email/resend"), "html", null, true);
yield "\" class=\"btn btn-outline-secondary btn-sm\">
";
// line 218
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("auth.resend_verification"), "html", null, true);
yield "
</a>
</div>
";
// line 222
if ((($tmp = ($context["success"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 223
yield " <div class=\"alert alert-success\" role=\"alert\">
";
// line 224
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("auth.logout_success"), "html", null, true);
yield "
</div>
";
}
// line 227
yield "
";
// line 228
if ((($tmp = ($context["registered"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 229
yield " <div class=\"alert alert-success\" role=\"alert\">
";
// line 230
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("auth.registration_success"), "html", null, true);
yield "
</div>
";
}
// line 233
yield " ";
if ((($tmp = ($context["verified"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 234
yield " <div class=\"alert alert-success\" role=\"alert\">
";
// line 235
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("auth.email_verified_success"), "html", null, true);
yield "
</div>
";
}
// line 238
yield " ";
if ((($tmp = ($context["resend"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 239
yield " <div class=\"alert alert-info\" role=\"alert\">
";
// line 240
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('__')->getCallable()("auth.verification_email_sent"), "html", null, true);
yield "
</div>
";
}
// line 243
yield " </div>
</div>
</div>
</div>
";
yield from [];
}
// line 249
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_scripts(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
// line 250
yield "<script>
// Auto-focus on email field
document.addEventListener('DOMContentLoaded', function() {
const emailField = document.getElementById('email');
if (emailField) {
emailField.focus();
}
});
</script>
";
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "auth/views/login.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 459 => 250, 452 => 249, 443 => 243, 437 => 240, 434 => 239, 431 => 238, 425 => 235, 422 => 234, 419 => 233, 413 => 230, 410 => 229, 408 => 228, 405 => 227, 399 => 224, 396 => 223, 394 => 222, 387 => 218, 383 => 217, 377 => 213, 371 => 210, 366 => 209, 364 => 208, 359 => 206, 355 => 205, 350 => 203, 342 => 198, 337 => 195, 327 => 188, 321 => 185, 312 => 179, 303 => 173, 281 => 153, 279 => 152, 276 => 151, 274 => 144, 268 => 141, 262 => 140, 256 => 137, 252 => 136, 249 => 135, 243 => 132, 240 => 131, 238 => 130, 235 => 129, 229 => 126, 225 => 125, 221 => 124, 217 => 123, 213 => 122, 210 => 121, 208 => 120, 205 => 119, 199 => 116, 196 => 115, 194 => 114, 188 => 111, 181 => 106, 174 => 105, 72 => 6, 65 => 5, 54 => 3, 43 => 1,);
}
public function getSourceContext(): Source
{
return new Source("", "auth/views/login.twig", "/app/modules/auth/views/login.twig");
}
}