Author: rjollos
Date: Fri Mar 15 11:58:37 2013
New Revision: 1456910

URL: http://svn.apache.org/r1456910
Log:
Refs #201: Added bootstrap template for `prefs_account.html` (from Olemis, with 
minor changes).

The template was compared against that in AccountManager 0.4.3, and no changes 
were necessary.

Added:
    
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_prefs_account.html
Modified:
    incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py

Added: 
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_prefs_account.html
URL: 
http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_prefs_account.html?rev=1456910&view=auto
==============================================================================
--- 
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_prefs_account.html
 (added)
+++ 
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_prefs_account.html
 Fri Mar 15 11:58:37 2013
@@ -0,0 +1,116 @@
+<!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="acct_mgr">
+  <xi:include href="bh_prefs.html" />
+  <?python
+    if _dgettext is not None:
+        dgettext = _dgettext ?>
+
+  <!--! FIXME [1] prevents this from matching its own output.
+        Should that really be necessary? -->
+  <div py:match="div[@id='tabcontent'][1]" py:attrs="select('@*')">
+    <div class="row">
+      <div class="span6">
+        ${select('*')}
+      </div>
+      <div py:if="account.delete_enabled" class="span6">
+        <h2>Delete Account</h2>
+
+        <div class="system-message" py:if="account.delete_error">
+          <xi:include href="widget_alert.html"
+              py:with="msglabel = 'Failed'; msgbody = account.delete_error" />
+        </div>
+
+        <form method="post" action="" id="acctmgr_delete_account"
+              onsubmit="return confirm('${account.delete_msg_confirm}');"
+              class="form-horizontal">
+          <div class="field control-group">
+            <label class="control-label" for="password_rm">Password:</label>
+            <div class="controls">
+              <div class="input-prepend">
+                <span class="add-on"><i class="icon-lock"></i></span>
+                <input type="password" id="password_rm"
+                       class="textwidget input-large" name="password"
+                       placeholder="Type your password" />
+              </div>
+            </div>
+          </div>
+          <div class="buttons">
+            <input type="hidden" name="action" value="delete" />
+            <input type="submit" class="btn"
+                   value="${dgettext('acct_mgr', 'Delete account')}" />
+          </div>
+        </form>
+      </div>
+    </div>
+  </div>
+
+  <head>
+    <title>Account</title>
+  </head>
+
+  <body>
+    <div class="system-message" py:if="account.error">
+      <xi:include href="widget_alert.html"
+          py:with="msglabel = 'Failed'; msgbody = account.error"/>
+    </div>
+    <p class="help-block" py:if="account.message">$account.message</p>
+    <h2>Change Password</h2>
+
+    <div class="system-message" py:if="account.save_error">
+      <xi:include href="widget_alert.html"
+          py:with="msglabel = 'Failed'; msgbody = account.save_error" />
+    </div>
+
+    <div class="field control-group">
+      <label for="old_password_chg" class="control-label">
+        Old Password:
+      </label>
+      <div class="controls">
+        <div class="input-prepend">
+          <span class="add-on">
+            <i class="icon-lock"></i>
+          </span>
+          <input type="password" id="old_password_chg"
+                 class="textwidget input-large" name="old_password"
+                 placeholder="Type current password" />
+        </div>
+      </div>
+    </div>
+    <div class="field control-group">
+      <label class="control-label" for="password_chg">
+        New Password:
+      </label>
+      <div class="controls">
+        <div class="input-prepend">
+          <span class="add-on">
+            <i class="icon-lock"></i>
+          </span>
+          <input type="password"  id="password_chg"
+                 class="textwidget input-large"
+                 name="password" placeholder="Type new password" />
+        </div>
+      </div>
+    </div>
+    <div class="field control-group">
+      <label class="control-label" for="password_confirm_chg">
+        Confirm Password:
+      </label>
+      <div class="controls">
+        <div class="input-prepend">
+          <span class="add-on">
+            <i class="icon-lock"></i>
+          </span>
+          <input type="password" id="password_confirm_chg"
+                 class="textwidget input-large" name="password_confirm"
+                 placeholder="Must match new password" />
+        </div>
+      </div>
+    </div>
+  </body>
+</html>

Modified: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py
URL: 
http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py?rev=1456910&r1=1456909&r2=1456910&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py (original)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py Fri Mar 15 
11:58:37 2013
@@ -130,6 +130,7 @@ class BloodhoundTheme(ThemeBase):
 
         # Account manager plugin
         'login.html' : ('bh_login.html', None),
+        'prefs_account.html' : ('bh_prefs_account.html', None),
     }
     BOOTSTRAP_CSS_DEFAULTS = (
         # ('XPath expression', ['default', 'bootstrap', 'css', 'classes'])


Reply via email to