11<template >
2- <div class =" step-content" >
3- <div
4- v-if =" status==='previous'"
5- class =" step-description vocab-body body-normal"
6- >
7- <p class =" vocab-body body-normal" >
8- {{ $t('stepper.CW.selected') }}
9- </p >
10- </div >
11- <div
12- v-else-if =" status==='current'"
13- class =" step-actions"
14- >
15- <v-checkbox v-model =" copyrightWaiverAgreed" >
16- {{ $t('stepper.CW.copyright-waive-agreement') }}
17- </v-checkbox >
18- <textarea
19- :value =" this.$t('cc0-waiver.text')"
20- :class =" 'waiver-textarea'"
21- />
22- <v-checkbox v-model =" copyrightWaiverConfirmed" >
23- {{ $t("stepper.CW.copyright-waive-confirmation") }}
24- </v-checkbox >
25- </div >
2+ <div class =" step-actions" >
3+ <v-checkbox v-model =" copyrightWaiverAgreed" >
4+ {{ $t('stepper.CW.copyright-waive-agreement') }}
5+ </v-checkbox >
6+ <textarea
7+ :value =" this.$t('cc0-waiver.text')"
8+ :class =" 'waiver-textarea'"
9+ />
10+ <v-checkbox v-model =" copyrightWaiverConfirmed" >
11+ {{ $t("stepper.CW.copyright-waive-confirmation") }}
12+ </v-checkbox >
2613 </div >
2714</template >
2815<script >
2916export default {
3017 name: ' CopyrightWaiverStep' ,
3118 props: {
32- stepId : Number ,
33- stepName : String ,
19+ id : Number ,
20+ name : String ,
3421 selected: Boolean ,
3522 status: {
3623 type: String ,
3724 validator (value ) {
38- return [' current ' , ' previous' , ' inactive' ].includes (value)
25+ return [' active ' , ' previous' , ' inactive' ].includes (value)
3926 }
4027 }
4128 },
@@ -52,11 +39,13 @@ export default {
5239 },
5340 set () {
5441 this .agreed = ! this .agreed
42+ const payload = { name: this .$props .name , id: this .$props .id }
5543 if (this .agreed && this .confirmed ) {
56- this . $emit ( ' change ' , this . $props . stepName , this . $props . stepId , true )
44+ payload . selected = true
5745 } else if (! this .agreed ) {
58- this . $emit ( ' change ' , this . $props . stepName , this . $props . stepId , undefined )
46+ payload . selected = undefined
5947 }
48+ this .$emit (' change' , payload)
6049 }
6150 },
6251 copyrightWaiverConfirmed: {
@@ -65,11 +54,13 @@ export default {
6554 },
6655 set () {
6756 this .confirmed = ! this .confirmed
57+ const payload = { name: this .$props .name , id: this .$props .id }
6858 if (this .agreed && this .confirmed ) {
69- this . $emit ( ' change ' , this . $props . stepName , this . $props . stepId , true )
59+ payload . selected = true
7060 } else if (! this .confirmed ) {
71- this . $emit ( ' change ' , this . $props . stepName , this . $props . stepId , undefined )
61+ payload . selected = undefined
7262 }
63+ this .$emit (' change' , payload)
7364 }
7465 }
7566 }
0 commit comments