templates/security/request.html.twig line 1

Open in your IDE?
  1. {% extends 'security/layout.html.twig' %}
  2. {% block bodyclass %}security{% endblock %}
  3. {% block content %}
  4. {% set pageData = false %}
  5. {% if platform_front('security.request') %}
  6. {% set pageData = platform_front('security.request') %}
  7. {% endif %}
  8. {% set labels = {
  9. email: 'email'|trans,
  10. } %}
  11. {% set placeholders = {
  12. email: '',
  13. } %}
  14. {% if pageData.override is defined %}
  15. {% if pageData.override.email is defined %}
  16. {% if pageData.override.email is key_usable('label') %}
  17. {% set labels = labels|merge({email: pageData.override.email.label|trans}) %}
  18. {% endif %}
  19. {% if pageData.override.email is key_usable('placeholder') %}
  20. {% set placeholders = placeholders|merge({email: pageData.override.email.placeholder|trans}) %}
  21. {% endif %}
  22. {% endif %}
  23. {% endif %}
  24. {{ form_start(requestForm) }}
  25. <div class="{% if pageData and pageData.wrapper is defined %} {{ pageData.wrapper}}{% endif %}">
  26. <div class="col-md-6 col-lg-4 {% if pageData and pageData.container is defined %} {{ pageData.container}}{% endif %}">
  27. {% if pageData.title is defined %}
  28. {% include '@component/atom/title.html.twig' with {'title': pageData.title} %}
  29. {% else %}
  30. <h1>{{ 'mot de passe oublié ?'|trans|capitalize }}</h1>
  31. {%endif%}
  32. <div class="{% if pageData and pageData.form is defined and pageData.form.row is defined %}{{ pageData.form.row}}{%else%}col-12{% endif %}">
  33. <div class="{% if pageData and pageData.form is defined and pageData.form.label is defined %}{{ pageData.form.label }}{% else %}col-12{% endif %}">
  34. {{ form_label(requestForm.email, labels.email) }}
  35. </div>
  36. <div class="{% if pageData and pageData.form is defined and pageData.form.input is defined %}{{ pageData.form.input }}{% else %}col-12{% endif %}">
  37. {{ form_widget(requestForm.email, {'attr' : {'placeholder': placeholders.email|trans}}) }}
  38. </div>
  39. </div>
  40. {% if pageData.sendResetPasswordRequestBySms is defined and pageData.sendResetPasswordRequestBySms %}
  41. <div class="{% if pageData and pageData.form is defined and pageData.form.row is defined %}{{ pageData.form.row}}{%else%}col-12{% endif %}">
  42. <div class="{% if pageData and pageData.form is defined and pageData.form.label is defined %}{{ pageData.form.label }}{% else %}col-12{% endif %}">
  43. {{ form_label(requestForm.sendResetPasswordRequestBySms) }}
  44. </div>
  45. <div class="{% if pageData and pageData.form is defined and pageData.form.input is defined %}{{ pageData.form.input }}{% else %}col-12{% endif %}">
  46. {{ form_widget(requestForm.sendResetPasswordRequestBySms) }}
  47. </div>
  48. </div>
  49. {% endif %}
  50. <div class="{% if pageData and pageData.button is defined and pageData.button.wrapper is defined %}{{ pageData.button.wrapper }}{% else %}col-12{% endif %}">
  51. <input type="submit"
  52. class="{% if pageData.button.class is defined %}{{ pageData.button.class }}{% else %}btn btn-secondary text-uppercase{% endif %}"
  53. value="{% if pageData.button.content is defined %}{{ pageData.button.content|trans }}{% else %}Réinitialiser le mot de passe{% endif %}">
  54. </div>
  55. <div class="{% if pageData and pageData.back is defined and pageData.back.wrapper is defined %}{{ pageData.back.wrapper }}{% else %}col-12{% endif %}">
  56. <a href="{{ path('app_login') }}"
  57. class="btn-security-back {% if pageData.back.class is defined %}{{ pageData.back.class }}{% else %}btn btn-default{% endif %}">
  58. <i class="fa fa-arrow-left"></i>
  59. {% if pageData.back.content is defined %}{{ pageData.back.content|trans }}{% else %}{{ 'retour'|trans|capitalize }}{% endif %}
  60. </a>
  61. </div>
  62. </div>
  63. </div>
  64. {{ form_end(requestForm) }}
  65. {% endblock content %}