You are here

htmlmail--user--password_reset.html.twig in HTML Mail 8

Same filename and directory in other branches
  1. 8.3 templates/htmlmail--user--password_reset.html.twig

File

templates/htmlmail--user--password_reset.html.twig
View source
  1. <?php
  2. /**
  3. * @file
  4. */
  5. ?>
  6. {#
  7. /**
  8. * @file
  9. * Sample template for sending user password reset messages with HTML Mail.
  10. *
  11. * The following variables are available in this template:
  12. *
  13. * - $message_id: The email message id, which is 'user_password_reset'
  14. * - $module: The sending module, which is 'user'.
  15. * - $key: The user email action, which is 'password_reset'.
  16. * - $headers: An array of email (name => value) pairs.
  17. * - $from: The configured sender address.
  18. * - $to: The recipient email address.
  19. * - $subject: The message subject line.
  20. * - $body: The formatted message body.
  21. * - $language: The language code for this message.
  22. * - $params: An array containing the following keys:
  23. * - account: The user object whose password is being requested, which
  24. * contains the following useful properties:
  25. * - uid: The user-id number.
  26. * - name: The user login name.
  27. * - mail: The user email address. Should be the same as $to.
  28. * - theme: The user-chosen theme, or a blank string if unset.
  29. * - signature: The user signature block.
  30. * - signature_format: The text input filter used to format the signature.
  31. * - created: Account creation date, as a unix timestamp.
  32. * - access: Account access date, as a unix timestamp.
  33. * - login: Account login date, as a unix timestamp.
  34. * - status: Integer 0 = disabled; 1 = enabled.
  35. * - timezone: User timezone, or NULL if unset.
  36. * - language: User language, or blank string if unset.
  37. * - picture: Path to user picture, or blank string if unset.
  38. * - init: The email address used to initially register this account.
  39. * - data: User profile data, as a serialized string.
  40. * - roles: Array of roles assigned to this user, as (rid => role_name)
  41. * pairs.
  42. * - $template_path: The relative path to the template directory.
  43. * - $template_url: The absolute url to the template directory.
  44. * - $theme: The name of the selected Email theme.
  45. * - $theme_path: The relative path to the Email theme directory.
  46. * - $theme_url: The absolute url to the Email theme directory.
  47. */
  48. #}
  49. <div class="htmlmail-user-password-reset-body htmlmail-user-body htmlmail-body">
  50. {{ message.body }}
  51. </div>
  52. {% if debug %}
  53. <hr />
  54. <div class="htmlmail-user-password-reset-debug htmlmail-user-debug htmlmail-debug">
  55. <dl>
  56. <dt>
  57. <p>To customize your user password reset messages:</p>
  58. </dt>
  59. <dd>
  60. <ol>
  61. {% if not theme %}
  62. <li>
  63. <p>
  64. Visit <u>admin/config/system/htmlmail</u>
  65. and select a theme to hold your custom email template files.
  66. </p>
  67. </li>
  68. {% elseif not theme_path %}
  69. <li>
  70. <p>
  71. <?php elseif (empty($theme_path)): ?>
  72. Visit <u>admin/build/themes</u>
  73. to enable your selected <u>{{ theme|capitalize }}</u> theme.
  74. </p>
  75. </li>
  76. {% endif %}
  77. {% set themeTemplate = "%s/%s"|format(theme_path, message_template) %}
  78. {% if _self.getTemplateName() == themeTemplate %}
  79. <li>
  80. <p>
  81. Edit your<br />
  82. <u><code>{{ _self.getTemplateName() }}</code></u>
  83. <br />file.
  84. </p>
  85. </li>
  86. {% endif %}
  87. {% if not theme_html_exists %}
  88. <li>
  89. <p>
  90. Copy<br />
  91. <u><code>{{ module_path }}/htmlmail.html.twig</code></u>
  92. <br />to<br />
  93. <u><code>{{ theme_path }}/htmlmail.html.twig</code></u>
  94. </p>
  95. </li>
  96. {% endif %}
  97. {% if not module_template_exists %}
  98. <li>
  99. <p>
  100. For general user-module message customization, copy<br />
  101. <u><code>{{ module_path }}//htmlmail.html.twig</code></u>
  102. <br />to<br />
  103. <code>{{ theme_path }}/{{ module_template }}</code>
  104. </p>
  105. </li>
  106. {% endif %}
  107. {% if not message_template_exists %}
  108. <li>
  109. <p>
  110. Copy<br />
  111. <u><code>{{ module_path }}//htmlmail.html.twig</code></u>
  112. <br />to<br />
  113. <u><code>{{ theme_path }}/{{ message_template }}</code></u>.
  114. </p>
  115. </li>
  116. {% endif %}
  117. <li>
  118. <p>Edit the copied file.</p>
  119. </li>
  120. {% endif %}
  121. <li>
  122. <p>Send a test message to make sure your customizations worked.</p>
  123. </li>
  124. <li>
  125. <p>
  126. If you think your customizations would be of use to others,
  127. please contribute your file as a feature request in the
  128. <a href="http://drupal.org/node/add/project-issue/htmlmail">issue queue</a>.
  129. </p>
  130. </li>
  131. </ol>
  132. </dd>
  133. <dt>
  134. <p>
  135. The user module sets the <u><code>$params</code></u> variable.
  136. For this message,
  137. </p>
  138. </dt>
  139. <dd>
  140. <p>
  141. <code><pre>
  142. $params = {{ pre_formatted_params }}
  143. </pre></code>
  144. </p>
  145. </dd>
  146. </dl>
  147. </div>
  148. {% endif %}