diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/borsetshire/js.js | 4 | ||||
-rw-r--r-- | web/cobrands/fixmystreet/fixmystreet.js | 22 |
2 files changed, 18 insertions, 8 deletions
diff --git a/web/cobrands/borsetshire/js.js b/web/cobrands/borsetshire/js.js index eee78df43..9fdb3e31b 100644 --- a/web/cobrands/borsetshire/js.js +++ b/web/cobrands/borsetshire/js.js @@ -1,7 +1,7 @@ (function(){ 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') { @@ -13,7 +13,7 @@ $('#demo-user-list dt').click(function(){ var form = document.forms.general_auth; - form.email.value = $(this).text(); + form.username.value = $(this).text(); form.password_sign_in.value = 'password'; set_redirect(form); form.submit(); diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js index cc156569f..6825ecbce 100644 --- a/web/cobrands/fixmystreet/fixmystreet.js +++ b/web/cobrands/fixmystreet/fixmystreet.js @@ -113,15 +113,25 @@ function isR2L() { make_multi: function() { var $this = $(this), - all = $this.data('all'); + all = $this.data('all'), + none = $this.data('none') || all, + allOpts = $this.data('all-options') || [], + extra = $this.data('extra'), + extraOpts = $this.data('extra-options') || []; + + var presets = [{ + name: all, + options: allOpts + }]; + + if (extra) { + presets.push({name: extra, options: extraOpts}); + } $this.multiSelect({ allText: all, - noneText: all, + noneText: none, positionMenuWithin: $('#side'), - presets: [{ - name: all, - options: [] - }] + presets: presets }); } |