aboutsummaryrefslogtreecommitdiffstats
path: root/web/cobrands/borsetshire/js.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/cobrands/borsetshire/js.js')
-rw-r--r--web/cobrands/borsetshire/js.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/web/cobrands/borsetshire/js.js b/web/cobrands/borsetshire/js.js
index eee78df43..2888a9548 100644
--- a/web/cobrands/borsetshire/js.js
+++ b/web/cobrands/borsetshire/js.js
@@ -1,7 +1,11 @@
(function(){
+ if (typeof jQuery === 'undefined') {
+ return;
+ }
+
function set_redirect(form) {
- var e = form.email.value;
+ var e = form.username.value;
if (e == 'inspector@example.org') {
form.r.value = 'my/planned';
} else if (e == 'cs@example.org') {
@@ -11,9 +15,9 @@
}
}
- $('#demo-user-list dt').click(function(){
+ $('#demo-user-list button').click(function(){
var form = document.forms.general_auth;
- form.email.value = $(this).text();
+ form.username.value = $(this).data('email');
form.password_sign_in.value = 'password';
set_redirect(form);
form.submit();