aboutsummaryrefslogtreecommitdiff
path: root/src/components/registration
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/registration')
-rw-r--r--src/components/registration/registration.js14
-rw-r--r--src/components/registration/registration.vue25
2 files changed, 32 insertions, 7 deletions
diff --git a/src/components/registration/registration.js b/src/components/registration/registration.js
index a3ef0f04..6eb316d0 100644
--- a/src/components/registration/registration.js
+++ b/src/components/registration/registration.js
@@ -1,6 +1,8 @@
import useVuelidate from '@vuelidate/core'
import { required, requiredIf, sameAs } from '@vuelidate/validators'
import { mapActions, mapState } from 'vuex'
+import InterfaceLanguageSwitcher from '../interface_language_switcher/interface_language_switcher.vue'
+import localeService from '../../services/locale/locale.service.js'
const registration = {
setup () { return { v$: useVuelidate() } },
@@ -11,10 +13,14 @@ const registration = {
username: '',
password: '',
confirm: '',
- reason: ''
+ reason: '',
+ language: ''
},
captcha: {}
}),
+ components: {
+ InterfaceLanguageSwitcher
+ },
validations () {
return {
user: {
@@ -26,7 +32,8 @@ const registration = {
required,
sameAs: sameAs(this.user.password)
},
- reason: { required: requiredIf(() => this.accountApprovalRequired) }
+ reason: { required: requiredIf(() => this.accountApprovalRequired) },
+ language: {}
}
}
},
@@ -64,6 +71,9 @@ const registration = {
this.user.captcha_solution = this.captcha.solution
this.user.captcha_token = this.captcha.token
this.user.captcha_answer_data = this.captcha.answer_data
+ if (this.user.language) {
+ this.user.language = localeService.internalToBackendLocale(this.user.language)
+ }
this.v$.$touch()
diff --git a/src/components/registration/registration.vue b/src/components/registration/registration.vue
index 3d409109..cc655c0b 100644
--- a/src/components/registration/registration.vue
+++ b/src/components/registration/registration.vue
@@ -163,6 +163,18 @@
</div>
<div
+ class="form-group"
+ :class="{ 'form-group--error': v$.user.language.$error }"
+ >
+ <interface-language-switcher
+ for="email-language"
+ :prompt-text="$t('registration.email_language')"
+ :language="v$.user.language.$model"
+ :set-language="val => v$.user.language.$model = val"
+ />
+ </div>
+
+ <div
v-if="accountApprovalRequired"
class="form-group"
>
@@ -271,7 +283,10 @@ $validations-cRed: #f04124;
.container {
display: flex;
flex-direction: row;
- //margin-bottom: 1em;
+
+ > * {
+ min-width: 0;
+ }
}
.terms-of-service {
@@ -294,8 +309,8 @@ $validations-cRed: #f04124;
.form-group {
display: flex;
flex-direction: column;
- padding: 0.3em 0.0em 0.3em;
- line-height:24px;
+ padding: 0.3em 0;
+ line-height: 2;
margin-bottom: 1em;
}
@@ -315,7 +330,7 @@ $validations-cRed: #f04124;
text-align: left;
span {
- font-size: 12px;
+ font-size: 0.85em;
}
}
@@ -341,7 +356,7 @@ $validations-cRed: #f04124;
.btn {
margin-top: 0.6em;
- height: 28px;
+ height: 2em;
}
.error {