Skip to content

Instantly share code, notes, and snippets.

@Djamy
Created April 13, 2015 10:19
Show Gist options
  • Save Djamy/63ced4bc79d9f189f8f7 to your computer and use it in GitHub Desktop.
Save Djamy/63ced4bc79d9f189f8f7 to your computer and use it in GitHub Desktop.
{% trans_default_domain 'emails' %}
{% set type = 'reset' %}
{% if isNewPassword %}
{% set type = 'new' %}
{% endif %}
{% set role = 'default' %}
{% if isPartner %}
{% set role = 'partner' %}
{% endif %}
{% block subject %}{{ 'lg.lostpassword.' ~ type ~ '.mail.title'|trans }}{% endblock %}
{% block body_text %}
{% set url = url('lostpassword_reinit', {'token': token}) %}
{{ 'lg.lostpassword.'~ type ~'.mail.'~ role ~'.body'|trans({'%username%': user.username, '%url%': url})|raw }}
{% endblock %}
{% block body_html %}
{% set url = url('lostpassword_reinit', {'token': token}) %}
{{ 'lg.lostpassword.'~ type ~'.mail.'~ role ~'.body.html'|trans({'%username%': user.username, '%url%': url})|raw }}
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment