You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by rj...@apache.org on 2013/07/06 07:23:27 UTC
svn commit: r1500203 - in /bloodhound/trunk/bloodhound_theme/bhtheme:
templates/bh_reset_password.html theme.py
Author: rjollos
Date: Sat Jul 6 05:23:27 2013
New Revision: 1500203
URL: http://svn.apache.org/r1500203
Log:
Added Bootstrap template for `reset_password.html`. Patch by Olemis. Refs #201.
Added:
bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_reset_password.html
Modified:
bloodhound/trunk/bloodhound_theme/bhtheme/theme.py
Added: bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_reset_password.html
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_reset_password.html?rev=1500203&view=auto
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_reset_password.html (added)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_reset_password.html Sat Jul 6 05:23:27 2013
@@ -0,0 +1,85 @@
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:py="http://genshi.edgewall.org/"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ xmlns:i18n="http://genshi.edgewall.org/i18n"
+ i18n:domain="bloodhound">
+ <xi:include href="layout.html" />
+ <?python
+ if _dgettext is not None:
+ dgettext = _dgettext ?>
+ <head>
+ <title>Reset Password</title>
+ <script type="text/javascript">
+ jQuery(document).ready(function($) {
+ $('input[@name=username]')[0].focus();
+ });
+ </script>
+ </head>
+
+ <body>
+ <div id="content" class="register row">
+ <h1 class="span12">Reset Password</h1>
+
+ <py:choose>
+ <div class="system-message span12" py:when="reset.logged_in">
+ <span class="label label-info">Already logged in</span>
+ <p class="help-block" i18n:msg="">You're already logged in. If you
+ need to change your password please use the
+ <a href="${href.prefs('account')}">Account Preferences</a> page.
+ </p>
+ </div>
+
+ <p class="help-block span12" py:when="reset.sent_to_email" i18n:msg="email">
+ A new password has been emailed to you at ${reset.sent_to_email} .
+ </p>
+
+ <py:otherwise>
+ <p class="help-block span12">If you've forgotten your password, enter
+ your username and email address below and you'll be emailed a new
+ password.
+ </p>
+
+ <div class="system-message span12" py:if="reset.error">
+ <xi:include href="widget_alert.html"
+ py:with="msglabel = 'Failed'; msgbody = reset.error"/>
+ </div>
+
+ <p class="help-block span12" py:if="reset.message">$reset.message</p>
+
+ <form method="post" id="acctmgr_passwd_reset" action=""
+ class="form-horizontal">
+ <div class="control-group">
+ <label for="username" class="control-label">Username:</label>
+ <div class="controls">
+ <input type="text" class="textwidget input-large no-add-on"
+ id="username" placeholder="e.g. myuser" name="username" />
+ </div>
+ </div>
+ <div class="control-group">
+ <label for="email" class="control-label">Email Address:</label>
+ <div class="controls">
+ <div class="input-prepend">
+ <span class="add-on">
+ <i class="icon-envelope"></i>
+ </span>
+ <input type="text" name="email" id="email"
+ class="textwidget input-large"
+ placeholder="user@domain.com"/>
+ </div>
+ </div>
+ </div>
+ <div class="control-group">
+ <div class="controls">
+ <input type="submit" class="btn"
+ value="${dgettext('acct_mgr', 'Reset password')}" />
+ </div>
+ </div>
+ </form>
+ </py:otherwise>
+ </py:choose>
+ </div>
+ </body>
+</html>
Modified: bloodhound/trunk/bloodhound_theme/bhtheme/theme.py
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py?rev=1500203&r1=1500202&r2=1500203&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/theme.py (original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/theme.py Sat Jul 6 05:23:27 2013
@@ -142,6 +142,7 @@ class BloodhoundTheme(ThemeBase):
'account_details.html': ('bh_account_details.html', None),
'login.html': ('bh_login.html', None),
'register.html': ('bh_register.html', None),
+ 'reset_password.html': ('bh_reset_password.html', None),
}
BOOTSTRAP_CSS_DEFAULTS = (
# ('XPath expression', ['default', 'bootstrap', 'css', 'classes'])