Make the inventory login page look a bit nicer.
authorDiane Trout <diane@caltech.edu>
Thu, 2 Dec 2010 01:19:07 +0000 (17:19 -0800)
committerDiane Trout <diane@caltech.edu>
Thu, 2 Dec 2010 01:19:07 +0000 (17:19 -0800)
This involved adjusting some of the base django templates.
Whenever given a choice I try to make our pages look more like the
admin site.

htsworkflow/frontend/templates/app_base.html
htsworkflow/frontend/templates/registration/login.html

index 728cc0160b2cfb225c0dea6f85717a07201cd371..1babcf69deda56de9304b3e83b6dba6916d47020 100644 (file)
     
     <script type="text/javascript" src="/static/js/htsw.js"></script>
 </head>
-<body>
-    <!-- Main Content -->
-    {% block msg %}
-    <div class="msg">{{ msg }}</div>
-    {% endblock %}
-    {% block content %}
-    {{ body }}
-    {% endblock %}
+<body class="{% block bodyclass %}{% endblock %}">
+    <!-- Content -->
+    <div id="content" class="{% block coltype %}colM{% endblock %}">
+        {% block pretitle %}{% endblock %}
+        {% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
+        {% block content %}
+        {% block object-tools %}{% endblock %}
+        {{ body }}
+        {% endblock %}
+        {% block sidebar %}{% endblock %}
+        <br class="clear" />
+    </div>
+    <!-- END Content -->
+
+    {% block footer %}<div id="footer"></div>{% endblock %}
 </body>
 </html>
index 5442caff62b02c0c1a66eacb03b35d1af380d8e2..cd28d5997ee32092f85fc4b8cdecac82f08bcde0 100644 (file)
@@ -1,29 +1,36 @@
-{% extends "flowcell_libraries_app.html" %}
+{% extends "app_base.html" %}
+{% load i18n %}
 
-{% block title %}
-Login
+{% block additional_css %}{% load adminmedia %}{{ block.super }}
+<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/base.css" />
+<link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/login.css" />
 {% endblock %}
+{% block title %}Login{% endblock %}
+{% block bodyclass %}login{% endblock %}
 
 {% block content %}
-
-{% if form.errors %}
-<p>Your username and password didn't match. Please try again.</p>
+{% if error_message %}
+<p class="errornote">{{ error_message }}</p>
 {% endif %}
-
-<form method="post" action="{% url django.contrib.auth.views.login %}">
-<table>
-<tr>
-    <td>{{ form.username.label_tag }}</td>
-    <td>{{ form.username }}</td>
-</tr>
-<tr>
-    <td>{{ form.password.label_tag }}</td>
-    <td>{{ form.password }}</td>
-</tr>
-</table>
-
-<input type="submit" value="login" />
-<input type="hidden" name="next" value="{{ next }}" />
+<div id="container">
+  <div id="header">
+    <h1>Login</h1>
+  </div>
+<form action="{{ app_path }}" method="post" id="login-form">
+  <div class="form-row">
+    <label for="id_username">{% trans 'Username:' %}</label> <input type="text" name="username" id="id_username" />
+  </div>
+  <div class="form-row">
+    <label for="id_password">{% trans 'Password:' %}</label> <input type="password" name="password" id="id_password" />
+    <input type="hidden" name="this_is_the_login_form" value="1" />
+  </div>
+  <div class="submit-row">
+    <label>&nbsp;</label><input type="submit" value="{% trans 'Log in' %}" />
+  </div>
 </form>
 
+<script type="text/javascript">
+document.getElementById('id_username').focus()
+</script>
+</div>
 {% endblock %}