cleaned up invitation page; fixed bug in bad-invitation handler.
authorgfawcett <gfawcett@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Mon, 27 Apr 2009 01:58:05 +0000 (01:58 +0000)
committergfawcett <gfawcett@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Mon, 27 Apr 2009 01:58:05 +0000 (01:58 +0000)
git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@400 6d9bc8c9-1ec2-4278-b937-99fde70a366f

conifer/syrup/views/courses.py
conifer/templates/course_invitation.xhtml

index 062ca2a..3f23728 100644 (file)
@@ -217,7 +217,7 @@ def course_invitation(request):
             # think. Should we temporarily disable accounts after
             # multiple failures?
             log('WARN', 'Invitation failure, user %r gave code %r' % \
-                (datetime.now(), request.user.username, code))
+                (request.user.username, code))
             error = _('The code you provided is not valid.')
             return g.render('course_invitation.xhtml', **locals())
 
index 5b3ea41..20879fb 100644 (file)
@@ -7,6 +7,11 @@ title = _('Join a course using an Invitation Code')
 <xi:include href="master.xhtml"/>
 <head>
   <title>${title}</title>
+  <script>
+    $(function() {
+    $('#code').focus();
+    });
+  </script>
 </head>
 <body>
   <h1>${title}</h1>
@@ -17,10 +22,10 @@ title = _('Join a course using an Invitation Code')
   more information.</p>
   <div class="errors" py:if="error">${error}</div>
   <form action="." method="POST">
-  <table>
-    <tr><th>Invitation Code:</th><td><input type="text" name="code" size="30" value="${code}"/></td></tr>
-    <tr><th/><td><input type="submit" value="Continue"/> <a style="margin-left: 12;" href="../">Go back</a></td></tr>
+  <table class="metadata_table">
+    <tr><th>Invitation Code:</th><td><input type="text" id="code" name="code" size="30" value="${code}"/></td></tr>
   </table>
+<p><input type="submit" value="Continue"/> <a style="margin-left: 12px;" href="../">or go back</a></p>
   </form>
   <div class="gap"/>
 </body>