changeset 564:e5d3552d4ad0

The ajax login didn't work from the register page. I think this is because there are two input boxes with the same ID in this situation. Renamed the ajax login form's ID's to make them unique.
author Brian Neal <bgneal@gmail.com>
date Mon, 13 Feb 2012 19:34:29 -0600
parents 93f049a241ff
children 6a265b5768ca
files gpp/accounts/static/js/ajax_login.js gpp/templates/accounts/ajax_login_form.html
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/gpp/accounts/static/js/ajax_login.js	Thu Feb 09 19:38:03 2012 -0600
+++ b/gpp/accounts/static/js/ajax_login.js	Mon Feb 13 19:34:29 2012 -0600
@@ -1,7 +1,7 @@
 $(function() {
    var loginError = $('#login-error');
-   var userBox = $('#id_username');
-   var passBox = $('#id_password');
+   var userBox = $('#ajax-login-username');
+   var passBox = $('#ajax-login-password');
    var loginDialog = $('#login-dialog').dialog({
       autoOpen: false,
       height: 375,
--- a/gpp/templates/accounts/ajax_login_form.html	Thu Feb 09 19:38:03 2012 -0600
+++ b/gpp/templates/accounts/ajax_login_form.html	Mon Feb 13 19:34:29 2012 -0600
@@ -3,10 +3,10 @@
    <p id="login-error" class="error"></p>
    <form>
       <fieldset>
-         <label for="id_username">Username:</label>
-         <input id="id_username" type="text" name="username" maxlength="30" class="text" /><br />
-         <label for="id_password">Password:</label>
-         <input type="password" name="password" id="id_password" class="text" />
+         <label for="ajax-login-username">Username:</label>
+         <input id="ajax-login-username" type="text" name="username" maxlength="30" class="text" /><br />
+         <label for="ajax-login-password">Password:</label>
+         <input type="password" name="password" id="ajax-login-password" class="text" />
       </fieldset>
    </form>
 <ul>