Added the ability for a user to change his email address.
The change is not performed immediately. First a confirmation email is sent to the user and if validated, the email address is changed.
This commit is contained in:
22
src/IDF/templates/idf/user/changeemail-email.txt
Normal file
22
src/IDF/templates/idf/user/changeemail-email.txt
Normal file
@@ -0,0 +1,22 @@
|
||||
{blocktrans}Hello {$user},
|
||||
|
||||
To confirm that you want {$email}
|
||||
to be your new email address, just follow this link:
|
||||
|
||||
{$url}
|
||||
|
||||
Alternatively, go to this page:
|
||||
|
||||
{$urlik}
|
||||
|
||||
and provide the following verification key:
|
||||
|
||||
{$key}
|
||||
|
||||
If you do not want to change your email address,
|
||||
just ignore this message.
|
||||
|
||||
Yours faithfully,
|
||||
The development team.
|
||||
{/blocktrans}
|
||||
|
39
src/IDF/templates/idf/user/changeemail.html
Normal file
39
src/IDF/templates/idf/user/changeemail.html
Normal file
@@ -0,0 +1,39 @@
|
||||
{extends "idf/base-simple.html"}
|
||||
{block body}
|
||||
{if $form.errors}
|
||||
<div class="px-message-error">
|
||||
<p>{trans 'Oups, we found an error in the form.'}</p>
|
||||
{if $form.get_top_errors}
|
||||
{$form.render_top_errors|unsafe}
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<form method="post" action=".">
|
||||
<table class="form" summary="">
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><strong>{$form.f.key.labelTag}:</strong><br />
|
||||
{if $form.f.key.errors}{$form.f.key.fieldErrors}{/if}
|
||||
{$form.f.key|unsafe}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><input type="submit" value="{trans 'Confirm Your New Email Address'}" name="submit" /> | <a href="{url 'IDF_Views_User::myAccount'}">{trans 'Cancel'}</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
{/block}
|
||||
{block context}
|
||||
<div class="issue-submit-info">
|
||||
<h2>{trans 'Instructions'}</h2>
|
||||
<p>{trans 'Use your email software to read your emails and open your verification email. Either click directly on the verification link or copy/paste the verification key in the box and submit the form.'}</p>
|
||||
</div>
|
||||
{/block}
|
||||
{block javascript}<script type="text/javascript">
|
||||
document.getElementById('id_key').focus()
|
||||
</script>
|
||||
{/block}
|
||||
|
@@ -28,6 +28,13 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><strong>{$form.f.email.labelTag}:</strong></th>
|
||||
<td>{if $form.f.email.errors}{$form.f.email.fieldErrors}{/if}
|
||||
{$form.f.email|unsafe}<br />
|
||||
<span class="helptext">{$form.f.email.help_text}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$form.f.language.labelTag}:</th>
|
||||
<td>{if $form.f.language.errors}{$form.f.language.fieldErrors}{/if}
|
||||
{$form.f.language|unsafe}
|
||||
|
Reference in New Issue
Block a user