diff --git a/server/views/account/email-signin.jade b/server/views/account/email-signin.jade index cb965ee7d0f..ed1578a1693 100644 --- a/server/views/account/email-signin.jade +++ b/server/views/account/email-signin.jade @@ -10,17 +10,18 @@ block content #flash-content .row .text-center - h2 Sign in or Sign Up with an Email here: + h2 Sign in or Sign Up with an Email .button-spacer - .col-sm-6.col-sm-offset-3 + div#sign-in-form + .col-sm-6.col-sm-offset-3 form(method='POST', action='/passwordless-auth') input(type='hidden', name='_csrf', value=_csrf) .form-group input.input-lg.form-control(type='email', name='email', id='email', placeholder='Email', autofocus=true, required) .button-spacer - button#magic-btn.btn.btn-primary.btn-lg.btn-block(type='submit') - span.fa.fa-envelope - | Get a magic link to sign in. + button.btn.btn-primary.btn-lg.btn-block(type='submit') + span.fa.fa-envelope + | Get a magic link to sign in. .row .col-sm-6.col-sm-offset-3 br @@ -34,18 +35,13 @@ block content a(href="/deprecated-signin") Or click here if you want to sign in with other options. script. - $(document).ready(function() { - - function disableMagicButton (isDisabled) { - if (isDisabled) { - $('#magic-btn') - .html('') - .prop('disabled', true); - } else { - $('#magic-btn') - .html('Get a magic link to sign in.') - .prop('disabled', false); - } + $(document).ready(function() { + function disableMagicButton () { + var userEmail = $("input[name=email]").val(); + $('#sign-in-form') + .empty() + .html('