]
let email = `${user}@${domain_name}`
- captcha_text = []
- for (let i = 0; i < 6; ++i) {
- let j = Math.floor(Math.random() * 36)
- captcha_text.push(
- '0123456789abcdefghijklmnopqrstuvwxyz'.slice(j, j + 1)
- )
- }
- captcha_text = captcha_text.join('')
-
let expires = new XDate(env.now)
expires.addDays(1)
given_names: given_name,
family_name,
email,
- captcha_text,
expires: expires.getTime()
}
session.set_json('placeholder', placeholder)
div.col-md-6 {
div.form-group {
label.form-label(for="verification-code") {'Verification code *'}
- input.form-control#verification-code(type="text" placeholder=placeholder.captcha_text required minlength=6 maxlength=6) {}
+ input.form-control#verification-code(type="text" placeholder='xxxxxx' required minlength=6 maxlength=6) {}
div.invalid-feedback {'Please enter the 6 characters from the verification image to right or below. We need this to protect us from spam and bots.'}
}
}
}
else
button.btn.btn-success.ml-3#card-1-create-account(type="button" disabled) {
- div.icon24-outer.rm-2 {
+ div.icon24-outer.mr-2 {
div.icon24-inner {_out.push(fa_user_plus)}
}
'Create account'
input_semaphore.try_acquire()
await api_call(
'/api/account/sign_up/set_draft.json',
- id_card_1_create_account.disabled ?
+ id_given_names.value.length === 0 &&
+ id_family_name.value.length === 0 &&
+ id_contact_me.checked &&
+ id_email.value.length === 0 ?
null :
{
email: id_email.value.slice(0, 256).toLowerCase(),
id_family_name.value.length === 0 &&
id_contact_me.checked &&
id_email.value.length === 0 &&
+ id_password.value.length === 0 &&
id_verification_code.value.length === 0
id_card_1_tick.hidden = true
id_card_1_cross.hidden = true