aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default')
-rw-r--r--themes/default/template/password.tpl83
-rw-r--r--themes/default/theme.css25
2 files changed, 81 insertions, 27 deletions
diff --git a/themes/default/template/password.tpl b/themes/default/template/password.tpl
index 6c6f9a35d..eef2c64e2 100644
--- a/themes/default/template/password.tpl
+++ b/themes/default/template/password.tpl
@@ -1,14 +1,16 @@
{if isset($MENUBAR)}{$MENUBAR}{/if}
<div id="content" class="content">
-
- <div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HOME}" title="{'Home'|@translate}" class="pwg-state-default pwg-button">
- <span class="pwg-icon pwg-icon-home">&nbsp;</span><span class="pwg-button-text">{'Home'|@translate}</span>
- </a></li>
+ <div class="titrePage">
+ <ul class="categoryActions">
+ <li>
+ <a href="{$U_HOME}" title="{'Home'|@translate}" class="pwg-state-default pwg-button">
+ <span class="pwg-icon pwg-icon-home">&nbsp;</span><span class="pwg-button-text">{'Home'|@translate}</span>
+ </a>
+ </li>
</ul>
- <h2>{'Password forgotten'|@translate}</h2>
- </div>
+
+ <h2>{$title}</h2>
+ </div>
{if count($errors)}
<div class="errors">
@@ -30,27 +32,54 @@
</div>
{/if}
-<form action="{$F_ACTION}" method="post" class="properties">
- <fieldset>
- <legend>{'Retrieve password'|@translate}</legend>
+{if $action ne 'none'}
+<form id="lostPassword" action="{$form_action}?action={$action}{if isset($key)}&amp;key={$key}{/if}" method="post">
+ <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
- <ul>
- <li>
- <span class="property">
- <label for="mail_address">{'Email address'|@translate}</label>
- </span>
- <input class="login" type="text" name="mail_address" id="mail_address" size="40" maxlength="40" >
- </li>
- <li>
- <span class="property">
- <label for="no_mail_address">{'No email address'|@translate}</label>
- </span>
- <input type="checkbox" id="no_mail_address" name="no_mail_address" value="1">
- </li>
- </ul>
- </fieldset>
+ {if $action eq 'lost'}
+ <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>
+
+ <p>
+ <label>
+ {'Username or email'|@translate}
+ <br>
+ <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}>
+ </label>
+ </p>
+
+ <p class="bottomButtons"><input class="submit" type="submit" name="submit" value="{'Change my password'|@translate}"></p>
+ {elseif $action eq 'reset'}
+
+ <div class="message">{'Hello'|@translate} <em>{$username}</em>. {'Enter your new password below.'|@translate}</div>
+
+ <p>
+ <label>
+ {'New password'|@translate}
+ <br>
+ <input type="password" name="use_new_pwd" id="use_new_pwd" value="">
+ </label>
+ </p>
+
+ <p>
+ <label>
+ {'Confirm Password'|@translate}
+ <br>
+ <input type="password" name="passwordConf" id="passwordConf" value="">
+ </label>
+ </p>
+
+ <p class="bottomButtons"><input class="submit" type="submit" name="submit" value="{'Submit'|@translate}"></p>
+ {/if}
- <p><input class="submit" type="submit" name="submit" value="{'Send new password'|@translate}"></p>
</form>
+{/if} {* $action ne 'none' *}
+
+<script type="text/javascript">
+{if $action eq 'lost'}
+{literal}try{document.getElementById('username_or_email').focus();}catch(e){}{/literal}
+{elseif $action eq 'reset'}
+{literal}try{document.getElementById('use_new_pwd').focus();}catch(e){}{/literal}
+{/if}
+</script>
</div> <!-- content -->
diff --git a/themes/default/theme.css b/themes/default/theme.css
index 63f61ae7b..f1e0df44b 100644
--- a/themes/default/theme.css
+++ b/themes/default/theme.css
@@ -787,3 +787,28 @@ LEGEND {
#piwigoAbout {width:600px;margin:0 auto;}
#linkToPiwigo {text-align:center;}
+.message {
+ background-color: lightyellow;
+ color:#333;
+ /* margin: 0.5em 1em 0.5em 1em; */
+ margin-bottom:1em;
+ padding: 12px;
+ -moz-border-radius: 3px;
+ -khtml-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+}
+
+#thePasswordPage form#lostPassword {
+ padding: 1em;
+}
+
+#thePasswordPage form#lostPassword p {
+ text-align: left;
+ margin: 0 0 1em 0;
+ line-height: 1.5em;
+}
+
+#thePasswordPage form#lostPassword p.bottomButtons {
+ margin-top:2em;
+} \ No newline at end of file