Login 2FA form shows inline labels

I failed to remove the inline labels of 2fa_instructions and 2fa_code, don’t know if it is related to the admin plugin or not.

@giminni, I cannot reproduce this using a fresh Grav + Admin 1.7.8 download.

What changes have you made to ‘achieve’ this behaviour?

  • Is this a fresh installation?
  • What makes your site different from a fresh install?
  • Is it an upgrade from 1.6?
  • Did you change anything in ‘/user/plugins/admin/pages/admin/login.md’?
    Afaik, that’s the only place where the strings ‘2fa_instructions’ and ‘2fa_code’ occur. They are used as fieldnames and should not be shown.
  • Or did you perhaps change file ‘user/plugins/admin/themes/grav/templates/login.html.twig’?
  • If you made no changes at all, did it happen immediately after enabling 2FA?
  • If you made any changes, what are you trying to achieve?

@pamtbaau, there are two plugins with login forms. The admin login plugin is working properly, the 2FA form from the user login plugin is not working properly, i guess it is a wrong include in the twig file “login-twofa.html.twig”


{% include [“forms/fields/#{field.type}/#{field.type}.html.twig”, ‘forms/fields/text/text.html.twig’] %}

{% set form = forms(‘login-twofa’) %}
{% set client_side_validation = form.client_side_validation is not null ? form.client_side_validation : config.plugins.form.client_side_validation|default(true) %}
{% set inline_errors = form.inline_errors is not null ? form.inline_errors : config.plugins.form.inline_errors(false) %}

{% for field in form.fields %} {% if field.type %}
{% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
{% endif %} {% endfor %}
{{ nonce_field('login-form', 'login-form-nonce')|raw }}

<div class="{{ form_button_outer_classes ?: 'form-actions secondary-accent' }}">
    <div class="form-actions primary-accent">
        <button type="submit" class="{{ form_button_classes ?: 'button primary' }}" name="task" value="login.twofa"><i class="fa fa-sign-in"></i>  {{ 'PLUGIN_LOGIN.BTN_LOGIN'|t }}</button>

        <button type="submit" class="{{ form_button_classes ?: 'button secondary' }}" name="task" value="login.logout">{{ 'PLUGIN_LOGIN.BTN_CANCEL'|t }}</button>


    </div>
</div>

BTW I am using gantry5 v5.4.37 in combination with grav v1.7.8

@giminni, I cannot reproduce it either when using the Login plugin to login at a front-end page.