Closed sergixnet closed 5 years ago
You also need the form
plugin.
Hi @rhukster
Thanks for the answer.
I have the form plugin installed too. These are the plugins I have installed now:
The Grav version now is v1.5.8
But the user and input fields are missing when activating the maintenance mode.
Thanks
Are you running version 1.3.2 of the maintenance plugin?
Your Twig 'should' look like this by default:
{% extends 'partials/base.html.twig' %}
{% block content %}
{{ page.content|default('PLUGIN_MAINTENANCE.OFFLINE_MARKDOWN'|t|markdown|raw) }}
{% if maintenance.allow_login and not grav.user.authenticated %}
<div id="maintenance-login" style="text-align: center;">
{% include 'partials/login-form.html.twig' with {content: 'PLUGIN_MAINTENANCE.AUTHORIZED_ACCESS'|t|markdown, show_login_form: true }%}
</div>
{% endif %}
{% endblock %}
I have maintenance 1.3.2 and with the default template the result is the same. User and password fields are missing:
Al I want is that any admin could see the frontend of the site at the same time with the maintenance mode activated.
Try adding user/pages/login/login.md
with this content:
---
title: Login
login_redirect_here: false
classes: login-backdrop
forms:
login:
client_side_validation: true
fields:
username:
type: text
id: username
label: Email Address
autofocus: true
datasets:
value-missing: 'email field required'
validate:
required: true
password:
type: password
id: password
label: Password
datasets:
value-missing: 'password field required'
validate:
required: true
---
# Login
Thank you @mahagr with that markdown page, I get a working login page.
One point: if you create another page to do that with a different title and file name, you must put slug: login
in the frontmatter, else doesn't work.
Thanks
Hi
I have a problem creating a page with a login form.
I'm creating a custom theme.
Plugins used:
GRAV v1.5.7
The problem is that the user and password fields are missing when I include the login form, this is the template code:
An this is the result:
The same problem is replicated when using Maintenance mode activated and enabled the login form:
What can I do to solve this?
Thanks