aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEkaterina Vaartis <vaartis@cock.li>2018-12-16 22:47:52 +0300
committerEkaterina Vaartis <vaartis@cock.li>2018-12-16 22:47:52 +0300
commitab6f1904fae8fad7e4a5de89d6d613285283f28e (patch)
tree31ebf0df54599e6b516009bff3662e1fd3b619a2
parent3c9c8052f7c0f55940033a787e48578d38ab06ac (diff)
Add a way to get new captcha on click
-rw-r--r--src/components/registration/registration.js5
-rw-r--r--src/components/registration/registration.vue3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/components/registration/registration.js b/src/components/registration/registration.js
index 0c65ac5d..6b79469c 100644
--- a/src/components/registration/registration.js
+++ b/src/components/registration/registration.js
@@ -31,7 +31,7 @@ const registration = {
this.$router.push('/main/all')
}
- this.getCaptcha().then(cpt => { this.captcha = cpt })
+ this.setCaptcha()
},
computed: {
token () { return this.$route.params.token },
@@ -61,6 +61,9 @@ const registration = {
console.warn('Registration failed: ' + error)
}
}
+ },
+ setCaptcha() {
+ this.getCaptcha().then(cpt => { this.captcha = cpt })
}
}
}
diff --git a/src/components/registration/registration.vue b/src/components/registration/registration.vue
index be0084dd..f187e215 100644
--- a/src/components/registration/registration.vue
+++ b/src/components/registration/registration.vue
@@ -77,8 +77,9 @@
<div class="form-group" id="captcha-group" v-if="captcha.type != 'none'">
<template v-if="captcha.type == 'kocaptcha'">
- <img v-bind:src="captcha.url">
+ <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>
<input :disabled="isPending"