source: trunk/themes/default/template/password.tpl @ 11992

Last change on this file since 11992 was 11992, checked in by plg, 13 years ago

feature 2027 implemented: the "lost password" feature was rewritten.

The algorithm is highly inspired from WordPress :

1) in a single field, you give a username or an email
2) Piwigo sends an email with the activation key
3) the user clicks on the link in the email (with the activation key) and is able to set a new password

The "lost password" feature is no longer limited to "classic" users:
administrators and webmasters can use it too (no need to tell webmasters
that they can only change their password in the database)

  • Property svn:eol-style set to LF
File size: 2.4 KB
Line 
1{if isset($MENUBAR)}{$MENUBAR}{/if}
2<div id="content" class="content">
3  <div class="titrePage">
4    <ul class="categoryActions">
5      <li>
6        <a href="{$U_HOME}" title="{'Home'|@translate}" class="pwg-state-default pwg-button">
7          <span class="pwg-icon pwg-icon-home">&nbsp;</span><span class="pwg-button-text">{'Home'|@translate}</span>
8        </a>
9      </li>
10    </ul>
11
12    <h2>{$title}</h2>
13  </div>
14
15  {if count($errors)}
16  <div class="errors">
17    <ul>
18      {foreach from=$errors item=error}
19      <li>{$error}</li>
20      {/foreach}
21    </ul>
22  </div>
23  {/if}
24
25  {if count($infos)}
26  <div class="infos">
27    <ul>
28      {foreach from=$infos item=info}
29      <li>{$info}</li>
30      {/foreach}
31    </ul>
32  </div>
33  {/if}
34
35{if $action ne 'none'}
36<form id="lostPassword" action="{$form_action}?action={$action}{if isset($key)}&amp;key={$key}{/if}" method="post">
37  <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
38
39  {if $action eq 'lost'}
40  <div class="message">{'Please enter your username or email address.'|@translate} {'You will receive a link to create a new password via email.'|@translate}</div>
41
42  <p>
43    <label>
44      {'Username or email'|@translate}
45      <br>
46      <input type="text" id="username_or_email" name="username_or_email" size="40" maxlength="40"{if isset($username_or_email)} value="{$username_or_email}"{/if}>
47    </label>
48  </p>
49
50  <p class="bottomButtons"><input class="submit" type="submit" name="submit" value="{'Change my password'|@translate}"></p>
51  {elseif $action eq 'reset'}
52
53  <div class="message">{'Hello'|@translate} <em>{$username}</em>. {'Enter your new password below.'|@translate}</div>
54
55  <p>
56    <label>
57      {'New password'|@translate}
58      <br>
59      <input type="password" name="use_new_pwd" id="use_new_pwd" value="">
60    </label>
61  </p>
62
63  <p>
64    <label>
65      {'Confirm Password'|@translate}
66      <br>
67      <input type="password" name="passwordConf" id="passwordConf" value="">
68    </label>
69  </p>
70
71  <p class="bottomButtons"><input class="submit" type="submit" name="submit" value="{'Submit'|@translate}"></p>
72  {/if}
73
74</form>
75{/if} {* $action ne 'none' *}
76
77<script type="text/javascript">
78{if $action eq 'lost'}
79{literal}try{document.getElementById('username_or_email').focus();}catch(e){}{/literal}
80{elseif $action eq 'reset'}
81{literal}try{document.getElementById('use_new_pwd').focus();}catch(e){}{/literal}
82{/if}
83</script>
84
85</div> <!-- content -->
Note: See TracBrowser for help on using the repository browser.