aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rw-r--r--data/stuff/test/auth.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/data/stuff/test/auth.js b/data/stuff/test/auth.js
index f14f0b1..5e98425 100644
--- a/data/stuff/test/auth.js
+++ b/data/stuff/test/auth.js
@@ -229,7 +229,16 @@ jQuery(function($) {
return false;
});
- $('#login').click(function() {
+ $('#login-dialog').on('show.bs.modal', function() {
+ $('#login-email').val('');
+ $('#login-password').val('');
+ });
+
+ $('#login-dialog').on('shown.bs.modal', function() {
+ $('#login-email').focus();
+ });
+
+ $('#login-confirm').click(function() {
var me = $(this);
if (me.hasClass('disabled'))
@@ -248,6 +257,7 @@ jQuery(function($) {
alert('Error ' + r.responseText);
}).done(function(r) {
console.log(r);
+ $('#login-dialog').modal('hide');
});
// stop event
@@ -258,7 +268,7 @@ jQuery(function($) {
if (ev.which == 13) {
setTimeout(function() {
// trigger login
- $('#login').click();
+ $('#login-confirm').click();
}, 10);
// stop event