Client - fix checkbox style when unchecked on privacy policy validation
This commit is contained in:
parent
df5bee936c
commit
e07a31cd0b
@ -13,7 +13,7 @@
|
||||
{{ $t('user.PROFILE.BACK_TO_PROFILE') }}
|
||||
</button>
|
||||
</div>
|
||||
<form v-else @submit.prevent="onSubmit()">
|
||||
<form v-else :class="{ errors: formErrors }" @submit.prevent="onSubmit()">
|
||||
<div class="policy-content">
|
||||
<PrivacyPolicy />
|
||||
</div>
|
||||
@ -23,6 +23,7 @@
|
||||
id="accepted_policy"
|
||||
required
|
||||
v-model="acceptedPolicy"
|
||||
@invalid="invalidateForm"
|
||||
/>
|
||||
<span>
|
||||
<i18n-t keypath="user.READ_AND_ACCEPT_PRIVACY_POLICY">
|
||||
@ -66,6 +67,7 @@
|
||||
() => store.getters[ROOT_STORE.GETTERS.ERROR_MESSAGES]
|
||||
)
|
||||
const acceptedPolicy = ref(false)
|
||||
const formErrors = ref(false)
|
||||
|
||||
function onSubmit() {
|
||||
store.dispatch(
|
||||
@ -73,6 +75,9 @@
|
||||
acceptedPolicy.value
|
||||
)
|
||||
}
|
||||
function invalidateForm() {
|
||||
formErrors.value = true
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
store.commit(ROOT_STORE.MUTATIONS.EMPTY_ERROR_MESSAGES)
|
||||
|
Loading…
Reference in New Issue
Block a user