Added ticket 95, ability to get a new password when forgotten.

This commit is contained in:
Loic d'Anterroches
2009-01-01 21:50:16 +01:00
parent c33b271519
commit 99f82216dd
11 changed files with 611 additions and 19 deletions

View File

@@ -15,6 +15,7 @@
<p><input name="action" id="action-login" value="login" type="radio" checked="checked" /> <label for="action-login">{trans 'Yes'}</label>, <label for="id_password">{trans 'my password is'}</label> <input type="password" name="password" id="id_password" /></p>
<p><input type="submit" value="{trans 'Sign in'}" />
| <a href="{url 'IDF_Views::passwordRecoveryAsk'}">{trans 'I lost my password!'}</a>
</p>
</form>
<script type="text/javascript">

View File

@@ -51,7 +51,7 @@
<p><strong>{trans 'Did you know?'}</strong><br />
{aurl 'url', 'IDF_Views::faq'}
{blocktrans}With your account, you will able to participate in the life of all the projects hosted here. Participating in a software project must be fun, so if you have troubles, you can <a href="{$url}">let us know about your issues at anytime</a>!{/blocktrans}
{blocktrans}With your account, you will able to participate in the life of all the projects hosted here. Participating in a software project must be fun, so if you have troubles, you can <a href="{$url}">let us know about your issues at anytime</a>!{/blocktrans}</p>
</div>
{/block}
{block javascript}<script type="text/javascript">

View File

@@ -0,0 +1,39 @@
{extends "idf/base-simple.html"}
{block body}
{if $form.errors}
<div class="px-message-error">
<p>{trans 'Oups, please check the provided login or email address to recover your password.'}</p>
{if $form.get_top_errors}
{$form.render_top_errors|unsafe}
{/if}
</div>
{/if}
<form method="post" action=".">
<table class="form" summary="">
<tr>
<th><strong>{$form.f.account.labelTag}:</strong></th>
<td>{if $form.f.account.errors}{$form.f.account.fieldErrors}{/if}
{$form.f.account|unsafe}<br />
<span class="helptext">{$form.f.account.help_text}</span>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" value="{trans 'Recover My Password'}" name="submit" /> | <a href="{url 'IDF_Views::index'}">{trans 'Cancel'}</a>
</td>
</tr>
</table>
</form>
{/block}
{block context}
<div class="issue-submit-info">
<p>{trans 'Provide either your login or email address, if a corresponding user is found in the database, we will send you an email with the details on how to reset your password.'}</p>
</div>
{/block}
{block javascript}<script type="text/javascript">
document.getElementById('id_account').focus();
</script>
{/block}

View File

@@ -0,0 +1,25 @@
{blocktrans}Hello {$user},
You lost your password and wanted to recover it.
To provide a new password for your account, you
just have to follow the provided link. You will
get a simple form to provide a new password.
{$url}
Alternatively, go to this page:
{$urlik}
and provide the following verification key:
{$key}
If you are not the one who requested to reset
your password, simply ignore this email, your
password will not be changed.
Yours faithfully,
The development team.
{/blocktrans}

View File

@@ -0,0 +1,40 @@
{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>&nbsp;</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>&nbsp;</td>
<td><input type="submit" value="{trans 'Recover Your Password'}" name="submit" /> | <a href="{url 'IDF_Views::index'}">{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>
<p>{trans 'Just after providing the confirmation key, you will be able to reset your password and use again this website fully.'}</p>
</div>
{/block}
{block javascript}<script type="text/javascript">
document.getElementById('id_key').focus()
</script>
{/block}

View File

@@ -0,0 +1,53 @@
{extends "idf/base-simple.html"}
{block body}
{if $form.errors}
<div class="px-message-error">
<p>{trans 'Oups, please check the form for errors.'}</p>
{if $form.get_top_errors}
{$form.render_top_errors|unsafe}
{/if}
{if $form.f.key.errors}{$form.f.key.fieldErrors}{/if}
</div>
{/if}
<form method="post" action=".">
<table class="form" summary="">
<tr>
<th><strong>{trans 'Login:'}</strong></th>
<td>{$new_user.login}</td>
</tr>
<tr>
<th><strong>{trans 'Email:'}</strong></th>
<td>{$new_user.email}</td>
</tr>
<tr>
<th><strong>{$form.f.password.labelTag}:</strong></th>
<td>{if $form.f.password.errors}{$form.f.password.fieldErrors}{/if}
{$form.f.password|unsafe}<br />
<span class="helptext">{$form.f.password.help_text}</span>
</td>
</tr>
<tr>
<th><strong>{$form.f.password2.labelTag}:</strong></th>
<td>{if $form.f.password2.errors}{$form.f.password2.fieldErrors}{/if}
{$form.f.password2|unsafe}
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input type="submit" value="{trans 'Reset Your Password'}" name="submit" /> | <a href="{url 'IDF_Views::index'}">{trans 'Cancel'}</a>
</td>
</tr>
</table>{$form.f.key|unsafe}
</form>
{/block}
{block context}
<div class="issue-submit-info">
<p>{trans 'This is the last step, but just <strong>be sure to have the cookies enabled</strong> to log in afterwards.'}</p>
</div>
{/block}
{block javascript}<script type="text/javascript">
document.getElementById('id_password').focus()
</script>
{/block}