File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed
contentcuration/contentcuration/frontend/accounts/pages Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change 132132 </VSlideYTransition >
133133
134134 <!-- Agreements -->
135- <VCheckbox
135+ <Checkbox
136136 v-model =" acceptedAgreement"
137137 :label =" $tr('agreement')"
138- required
139- :rules =" tosAndPolicyRules"
140- :hide-details =" false"
141138 class =" my-1 policy-checkbox"
142139 />
140+ <!-- Error message for Agreements -->
141+ <VSlideYTransition >
142+ <div v-if =" !acceptedAgreement" class =" error--text policy-error theme--light v-messages" >
143+ <div class =" v-messages__message" >
144+ {{ $tr("ToSRequiredMessage") }}
145+ </div >
146+ </div >
147+ </VSlideYTransition >
148+
143149 <div class =" span-spacing" >
144150 <span >
145151 <ActionLink
241247 passwordConfirmRules () {
242248 return [value => (this .form .password1 === value ? true : this .$tr (' passwordMatchMessage' ))];
243249 },
244- tosAndPolicyRules () {
245- return [value => (value ? true : this .$tr (' ToSRequiredMessage' ))];
246- },
247250 acceptedAgreement: {
248251 get () {
249252 return this .form .accepted_tos && this .form .accepted_policy ;
424427 return id === uses .OTHER && this .form .uses .includes (id);
425428 },
426429 submit () {
427- if (this .$refs .form .validate ()) {
430+ // We need to check the "acceptedAgreement" here explicitly because it is not a
431+ // Vuetify form field and does not trigger the form validation.
432+ if (this .$refs .form .validate () && this .acceptedAgreement ) {
428433 const cleanedData = this .clean (this .form );
429434 return this .register (cleanedData)
430435 .then (() => {
528533 }
529534 }
530535
531- .policy-checkbox / deep / .v-messages {
536+ .policy-error {
532537 min-height : 0 ;
538+ margin-bottom : 4px ;
533539 margin-left : 40px ;
534540 }
535541
You can’t perform that action at this time.
0 commit comments