login.html.twig 1.3 KB

123456789101112131415161718192021222324252627
  1. {% embed 'partials/login.html.twig' with {title:'Grav Login'} %}
  2. {% block form %}
  3. {% for field in page.header.form.fields %}
  4. {% if field.type %}
  5. <div>
  6. {% include ["forms/fields/#{field.type}/#{field.type}.html.twig", 'forms/fields/text/text.html.twig'] %}
  7. </div>
  8. {% endif %}
  9. {% endfor %}
  10. <div class="form-actions secondary-accent">
  11. {% if notAuthorized %}
  12. <a class="button secondary" onclick="window.history.back()"><i class="fa fa-reply"></i> {{ 'PLUGIN_ADMIN.BACK'|tu }}</a>
  13. {% else %}
  14. {% if not authenticated %}
  15. <a class="button secondary" href="{{ base_url_relative }}/forgot"><i class="fa fa-exclamation-circle"></i> {{ 'PLUGIN_ADMIN.LOGIN_BTN_FORGOT'|tu }}</a>
  16. <button type="submit" class="button primary" name="task" value="login"><i class="fa fa-sign-in"></i> {{ 'PLUGIN_ADMIN.LOGIN_BTN'|tu }}</button>
  17. {% else %}
  18. <button type="submit" class="button primary" name="task" value="logout"><i class="fa fa-sign-in"></i> {{ 'PLUGIN_ADMIN.LOGOUT'|tu }}</button>
  19. {% endif %}
  20. {% endif %}
  21. </div>
  22. {% endblock %}
  23. {% endembed %}