diff --git a/app/javascript/login/create_account.vue b/app/javascript/login/create_account.vue
index b70fdea68..3a0da4f5e 100644
--- a/app/javascript/login/create_account.vue
+++ b/app/javascript/login/create_account.vue
@@ -21,10 +21,11 @@
>
@@ -73,6 +74,8 @@ export default {
validate: null,
},
},
+ captcha_response: null,
+ captcha_errored: false
}),
components: {
EmailField,
@@ -80,7 +83,12 @@ export default {
},
computed: {
submitDisabled: function () {
- return this.form.email.valid === false;
+ if (this.currentSettings.recaptcha_site_key) {
+ return this.captcha_errored || this.captcha_response == null || this.form.email.valid === false
+ } else {
+ console.log('submitDisabled: check email')
+ return this.form.email.valid === false;
+ }
},
captchaKey: function() {
return this.currentSettings.recaptcha_site_key
@@ -88,7 +96,7 @@ export default {
},
methods: {
onVerifyCaptcha: function (response) {
- // console.log('Verify: ' + response)
+ console.log('Verify: ' + response)
this.captcha_response = response;
this.captcha_errored = false;
},
@@ -98,16 +106,12 @@ export default {
},
onSubmit: async function (event) {
event.preventDefault();
- if (this.currentSettings.recaptcha_site_key && this.captcha_errored) {
- this.alert.text = VALID_CAPTCHA_REQUIRED;
- this.alert.visible = true;
- return;
- }
await validateFields(this.form.email);
if (this.form.email.valid === false) {
- this.error.text = LOGIN_INVALID_FIELDS;
- this.error.visible = true;
+ // This does not do anything @gail - verify
+ // this.error.text = LOGIN_INVALID_FIELDS;
+ // this.error.visible = true;
} else {
// We need the URL of the destination if any that the user is going to be sent to
// This would, for example, be the survey
@@ -146,10 +150,6 @@ export default {
});
}
},
- },
- mounted() {
- this.captcha_response = null;
- this.captcha_errored = false;
}
};