aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShpuld Shpludson <shp@cock.li>2018-12-22 06:17:56 +0000
committerShpuld Shpludson <shp@cock.li>2018-12-22 06:17:56 +0000
commite59b67e119f1f598354fb0dca86774e1b0f6c4c4 (patch)
treed0e074a620898570c9ba6e6b3791f471571817e4
parent2921a25cb4979c2b9fa359e5137c046bdd0d1bcc (diff)
parent10642df528ab0119055224e289f39ecd48e49dbd (diff)
Merge branch 'captcha' into 'develop'
Make captcha stateless See merge request pleroma/pleroma-fe!434
-rw-r--r--src/components/registration/registration.js2
-rw-r--r--src/components/registration/registration.vue7
-rw-r--r--src/i18n/en.json2
3 files changed, 8 insertions, 3 deletions
diff --git a/src/components/registration/registration.js b/src/components/registration/registration.js
index 65b2fb9b..dd8e6e5d 100644
--- a/src/components/registration/registration.js
+++ b/src/components/registration/registration.js
@@ -48,8 +48,10 @@ const registration = {
async submit () {
this.user.nickname = this.user.username
this.user.token = this.token
+
this.user.captcha_solution = this.captcha.solution
this.user.captcha_token = this.captcha.token
+ this.user.captcha_answer_data = this.captcha.answer_data
this.$v.$touch()
diff --git a/src/components/registration/registration.vue b/src/components/registration/registration.vue
index f187e215..1455354e 100644
--- a/src/components/registration/registration.vue
+++ b/src/components/registration/registration.vue
@@ -76,15 +76,16 @@
</div>
<div class="form-group" id="captcha-group" v-if="captcha.type != 'none'">
+ <label class='form--label' for='captcha-label'>$t('captcha')</label>
+
<template v-if="captcha.type == 'kocaptcha'">
<img v-bind:src="captcha.url" v-on:click="setCaptcha">
- <sub>Click the image to get a new captcha</sub>
- <label class='form--label' for='captcha-label'>CAPTCHA</label>
+ <sub>{{$t('registration.new_captcha')}}</sub>
<input :disabled="isPending"
v-model='captcha.solution'
- class='form-control' id='captcha-answer' type='text'>
+ class='form-control' id='captcha-answer' type='text' autocomplete="off">
</template>
</div>
diff --git a/src/i18n/en.json b/src/i18n/en.json
index f445bfc2..3662c6f6 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -74,6 +74,8 @@
"password_confirm": "Password confirmation",
"registration": "Registration",
"token": "Invite token",
+ "captcha": "CAPTCHA",
+ "new_captcha": "Click the image to get a new captcha",
"validations": {
"username_required": "cannot be left blank",
"fullname_required": "cannot be left blank",