span.h4.modal-title {'Sign in'}
}
div.modal-body {
- form#sign-in-form {
- div.row {
- div.col-md-12 {
- div.form-group {
- label.form-label(for="sign-in-form-email") {'Email'}
- input.form-control#sign-in-form-email(type="text" name="email" placeholder="Account email address" required="required" maxlength=256) {}
- }
+ div.row {
+ div.col-md-12 {
+ div.form-group {
+ label.form-label(for="sign-in-email") {'Email'}
+ input.form-control#sign-in-email(type="text" placeholder="Account email address" required="required" maxlength=256) {}
}
}
- div.row {
- div.col-md-12 {
- div.form-group {
- label.form-label(for="sign-in-form-password") {'Password'}
- input.form-control#sign-in-form-password(type="password" name="password" placeholder="Account password" required="required" minlength=8 maxlength=256) {}
- }
+ }
+ div.row {
+ div.col-md-12 {
+ div.form-group {
+ label.form-label(for="sign-in-password") {'Password'}
+ input.form-control#sign-in-password(type="password" placeholder="Account password" required="required" minlength=8 maxlength=256) {}
}
}
- input.btn.btn-success.btn-send(style="display: none;" type="submit" value="Sign in") {}
}
p.mt-2 {
button.btn.btn-outline-secondary(type="button" data-dismiss="modal") {
'Cancel'
}
- button.btn.btn-primary(type="submit" form="sign-in-form") {
+ button.btn.btn-primary#sign-in-submit(type="button") {
'Sign in'
}
}
p {
'Did you notice something not quite right, or just want to share your impression of this page?'
}
- form#feedback-form {
- div.row {
- div.col-md-12 {
- div.form-group {
- label(for="feedback-form-message") {'Message *'}
- textarea.form-control#feedback-form-message(name="message" placeholder="Please tell us your thoughts" rows="4" required="required" data-error="Please, leave us a message.") {}
- div.help-block.with-errors {}
- }
+ div.row {
+ div.col-md-12 {
+ div.form-group {
+ label(for="feedback-message") {'Message *'}
+ textarea.form-control#feedback-message(placeholder="Please tell us your thoughts" rows="4" required="required" data-error="Please, leave us a message.") {}
+ div.help-block.with-errors {}
}
}
- p {} // fix this later
- div.row {
- div.col-md-12 {
- p.text-muted {
- strong {'*'}
- 'These fields are required.'
- //'Contact form template by '
- //a(href="https://bootstrapious.com/p/how-to-build-a-working-bootstrap-feedback-form" target="_blank") {'Bootstrapious'}
- //'.'
- }
+ }
+ p {} // fix this later
+ div.row {
+ div.col-md-12 {
+ p.text-muted {
+ strong {'*'}
+ 'These fields are required.'
+ //'Contact form template by '
+ //a(href="https://bootstrapious.com/p/how-to-build-a-working-bootstrap-feedback-form" target="_blank") {'Bootstrapious'}
+ //'.'
}
}
- input.btn.btn-success.btn-send(style="display: none;" type="submit" value="Send message") {}
}
}
div.modal-footer {
button.btn.btn-outline-secondary(type="button" data-dismiss="modal") {
'Cancel'
}
- button.btn.btn-primary(type="submit" form="feedback-form") {
+ button.btn.btn-primary#feedback-submit(type="button") {
'Submit'
}
}
document.getElementById('sign-in').addEventListener(
'click',
() => {
- document.getElementById('sign-in-form-email').value = ''
- document.getElementById('sign-in-form-password').value = ''
+ document.getElementById('sign-in-email').value = ''
+ document.getElementById('sign-in-password').value = ''
$('#sign-in-modal').modal('show')
}
)
'shown.bs.modal',
() => {
console.log('bloo')
- $('#sign-in-form-email').focus()
+ $('#sign-in-email').focus()
}
)
- $(document).on(
- 'submit',
- '#sign-in-form',
- async e => {
- e.preventDefault()
+ document.getElementById('sign-in-submit').addEventListener(
+ 'click',
+ async () => {
let email
try {
- email = document.getElementById('sign-in-form-email').value.slice(0, 256).toLowerCase()
+ email = document.getElementById('sign-in-email').value.slice(0, 256).toLowerCase()
await sign_in(
email,
- document.getElementById('sign-in-form-password').value.slice(0, 256)
+ document.getElementById('sign-in-password').value.slice(0, 256)
)
}
catch (error) {
document.getElementById('give-feedback').addEventListener(
'click',
() => {
- $('#feedback-form-message').text('')
+ $('#feedback-message').text('')
$('#feedback-modal').modal('show')
return false
}
$('#feedback-modal').on(
'shown.bs.modal',
() => {
- $('#feedback-form-message').focus()
+ $('#feedback-message').focus()
}
)
- $(document).on(
- 'submit',
- '#feedback-form',
- e => {
- e.preventDefault()
+ document.getElementById('feedback-submit').addEventListener(
+ 'click',
+ () => {
$.ajax(
{
url: '/api/feedback.html',
type: 'POST',
data: {
page: window.location.href,
- message: $('#feedback-form-message').val()
+ message: $('#feedback-message').val()
},
success: (data, textStatus, jqXHR) => {
$('#feedback-modal').modal('hide')
p {} // fix this later
div.row {
div.col-md-12 {
- input.btn.btn-success.btn-send(type="submit" value="Send message") {}
+ button.btn.btn-success.btn-send(type="submit") {'Send message'}
}
}
p {} // fix this later
// p {'Note: If your name is one word or does not fit given names/family name pattern, then please enter given names only; we will address you by your given names. Your given names will be visible to other users if you comment on our blog. Your email and family name will remain private.'}
// div.row {
// div.col-md-12 {
- // input.btn.btn-success.btn-send(type="submit" value="Change") {}
+ // button.btn.btn-success.btn-send(type="submit") {'Change'}
// }
// }
// }
// }
// div.row {
// div.col-md-12 {
- // input.btn.btn-success.btn-send(type="submit" value="Change") {}
+ // button.btn.btn-success.btn-send(type="submit") {'Change'}
// }
// }
// }
// }
// div.row {
// div.col-md-12 {
- // input.btn.btn-success.btn-send(type="submit" value="Change") {}
+ // button.btn.btn-success.btn-send(type="submit") {'Change'}
// }
// }
// }
// }
// div.row {
// div.col-md-12 {
- // input.btn.btn-success.btn-send(type="submit" value="Change") {}
+ // button.btn.btn-success.btn-send(type="submit") {'Change'}
// }
// }
// }
// }
// div.row {
// div.col-md-12 {
- // input.btn.btn-success.btn-send(type="submit" value="Change") {}
+ // button.btn.btn-success.btn-send(type="submit") {'Change'}
// }
// }
// }
}
}
- input.btn.btn-success#step-1-continue(type="button" value="Continue") {}
+ button.btn.btn-success#step-1-continue(type="button") {'Continue'}
p.'mt-3'.mb-0 {'* This field is required.'}
}
}
div.card-body {
p#step-2-message {'Please enter account details first.'}
- input.btn.btn-outline-secondary#step-2-back(type="button" value="Back") {}
- input.btn.btn-outline-secondary.ml-3#step-2-resend-email(type="button" value="Re-send email") {}
+ button.btn.btn-outline-secondary#step-2-back(type="button") {'Back'}
+ button.btn.btn-outline-secondary.ml-3#step-2-resend-email(type="button") {'Re-send email'}
}
}
}
}
}
- input.btn.btn-success#step-1-continue(type="button" value="Continue") {}
+ button.btn.btn-success#step-1-continue(type="button") {'Continue'}
p.'mt-3'.mb-0 {'* This field is required.'}
}
}
div.card-body {
p#step-2-message {'Please enter account details first.'}
- input.btn.btn-outline-secondary#step-2-back(type="button" value="Back") {}
- input.btn.btn-outline-secondary.ml-3#step-2-resend-email(type="button" value="Re-send email") {}
+ button.btn.btn-outline-secondary#step-2-back(type="button") {'Back'}
+ button.btn.btn-outline-secondary.ml-3#step-2-resend-email(type="button") {'Re-send email'}
}
}
}
img#verification-image(src="/api/verification_image.png?seq=0" width=300 height=150) {}
}
div.'col-md-2'.my-auto.text-center {
- input.btn.btn-outline-secondary#'step-1-new-code'(type="button" value="New code") {}
+ button.btn.btn-outline-secondary#'step-1-new-code'(type="button") {'New code'}
}
}
p.mt-3 {'Note: If your name is one word or does not fit given names/family name pattern, then please enter given names only. Your given names are visible to other users if you comment on our blog. Your email and family name remain private.'}
- input.btn.btn-success#step-1-continue(type="button" value="Continue") {}
+ button.btn.btn-success#step-1-continue(type="button") {'Continue'}
p.'mt-3'.mb-0 {'* These fields are required.'}
}
}
div.card-body {
p#step-2-message {'Please enter your details first.'}
- input.btn.btn-outline-secondary#step-2-back(type="button" value="Back") {}
- input.btn.btn-outline-secondary.ml-3#step-2-continue(type="button" value="Continue") {}
+ button.btn.btn-outline-secondary#step-2-back(type="button") {'Back'}
+ button.btn.btn-outline-secondary.ml-3#step-2-continue(type="button") {'Continue'}
}
}
}
div.card-body {
p#step-3-message {'Please create your account first.'}
- input.btn.btn-outline-secondary#step-3-back(type="button" value="Back") {}
- input.btn.btn-outline-secondary.ml-3#step-3-resend-email(type="button" value="Re-send email") {}
+ button.btn.btn-outline-secondary#step-3-back(type="button") {'Back'}
+ button.btn.btn-outline-secondary.ml-3#step-3-resend-email(type="button") {'Re-send email'}
}
}
}
}
}
- input.btn.btn-success#step-1-continue(type="button" value="Continue") {}
+ button.btn.btn-success#step-1-continue(type="button") {'Continue'}
p.'mt-3'.mb-0 {'* These fields are required.'}
}
}
div.card-body {
p#step-2-message {'Please enter link details first.'}
- input.btn.btn-outline-secondary#step-2-back(type="button" value="Back") {}
- input.btn.btn-outline-secondary.ml-2#step-2-sign-in(type="button" value="Sign in") {}
+ button.btn.btn-outline-secondary#step-2-back(type="button") {'Back'}
+ button.btn.btn-outline-secondary.ml-2#step-2-sign-in(type="button") {'Sign in'}
}
}
}
}
}
- input.btn.btn-success#step-1-continue(type="button" value="Continue") {}
+ button.btn.btn-success#step-1-continue(type="button") {'Continue'}
p.'mt-3'.mb-0 {'* These fields are required.'}
}
}
div.card-body {
p#step-2-message {'Please enter link details first.'}
- input.btn.btn-outline-secondary#step-2-back(type="button" value="Back") {}
- input.btn.btn-outline-secondary.ml-2#step-2-sign-in(type="button" value="Sign in") {}
+ button.btn.btn-outline-secondary#step-2-back(type="button") {'Back'}
+ button.btn.btn-outline-secondary.ml-2#step-2-sign-in(type="button") {'Sign in'}
}
}
}