incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g..@apache.org
Subject svn commit: r1413457 - in /incubator/bloodhound/trunk/bloodhound_theme/bhtheme: templates/bh_login.html theme.py
Date Mon, 26 Nov 2012 00:47:35 GMT
Author: gjm
Date: Mon Nov 26 00:47:34 2012
New Revision: 1413457

URL: http://svn.apache.org/viewvc?rev=1413457&view=rev
Log:
basic conversion of account manager login form to bootstrap styling - towards #53 (based on
patch from olemis)

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

Added: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_login.html
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_login.html?rev=1413457&view=auto
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_login.html (added)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_login.html Mon Nov 26
00:47:34 2012
@@ -0,0 +1,115 @@
+<!DOCTYPE html
+    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!--!
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+
+<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>Login</title>
+    <script type="text/javascript">
+    jQuery(document).ready(function($) {
+        $("body").addClass("login");
+        $('#user')[0].focus();
+    });
+    </script>
+  </head>
+
+  <body>
+    <div id="content" class="login">
+
+      <div class="central system-message" py:if="login_error">
+        <xi:include href="widget_alert.html" 
+            py:with="msglabel = 'Failed'; msgbody = login_error"/>
+      </div>
+      <div class="spacer" py:if="not login_error"></div>
+
+      <h1>Login</h1>
+
+      <form class="form-horizontal" method="post" id="acctmgr_loginform" action="">
+        <div>
+          <input type="hidden" name="referer" value="${referer}" />
+        </div>
+        <div class="textbox control-group">
+          <label for="user" class="control-label">Username:</label>
+          <div class="controls">
+            <input type="text" id="user" name="user" class="textwidget"
+                size="20" placeholder="User name" />
+          </div>
+        </div>
+        <div class="textbox control-group">
+          <label for="password" class="control-label">Password:</label>
+          <div class="controls">
+            <input type="password" id="password" name="password"
+                class="textwidget" size="20" placeholder="Password"/>
+            <div id="login_options" class="central"
+                 py:if="reset_password_enabled and login_opt_list != True">
+              
+              <p class="hint">
+                <a href="${href.reset_password()}">Forgot your password?</a>
+              </p> 
+            </div>
+            <div class="textbox" py:if="persistent_sessions">
+              <input type="checkbox" id="rememberme" name="rememberme"
+                     value="1" />
+              <label for="rememberme">Remember me</label>
+            </div>
+          </div>
+        </div>
+        <div class="textbox control-group">
+          <div class="controls">
+            <div id="login_options" class="buttons central nav">
+              <input type="submit" value="${dgettext('acct_mgr', 'Login')}" 
+                  class="btn" />
+              <ul py:if="login_opt_list == True" style="list-style: none">
+                <py:choose py:if="registration_enabled">
+                  <li class="first" py:when="reset_password_enabled">
+                    <a href="${href.register()}">Register</a>
+                  </li>
+                  <li class="first last" py:otherwise="">
+                    <a href="${href.register()}">Register</a>
+                  </li>
+                </py:choose>
+                <py:choose py:if="reset_password_enabled">
+                  <li class="last" py:when="registration_enabled">
+                    <a href="${href.reset_password()}">Forgot your password?</a>
+                  </li>
+                  <li class="first last" py:otherwise="">
+                    <a href="${href.reset_password()}">Forgot your password?</a>
+                  </li>
+                </py:choose>
+              </ul>
+            </div>
+          </div>
+        </div>
+      </form>
+
+    </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=1413457&r1=1413456&r2=1413457&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py (original)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/theme.py Mon Nov 26 00:47:34 2012
@@ -103,6 +103,9 @@ class BloodhoundTheme(ThemeBase):
 
         # General purpose
         'history_view.html' : ('bh_history_view.html', None),
+
+        # Account manager plugin
+        'login.html' : ('bh_login.html', None),
     }
     BOOTSTRAP_CSS_DEFAULTS = (
         # ('XPath expression', ['default', 'bootstrap', 'css', 'classes'])



Mime
View raw message