-
-
Notifications
You must be signed in to change notification settings - Fork 163
/
Copy pathCopyrightWaiverStep.vue
93 lines (93 loc) · 2.58 KB
/
CopyrightWaiverStep.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<template>
<div class="step-content">
<div
v-if="status==='previous'"
class="step-description vocab-body body-normal"
>
<p class="vocab-body body-normal">
{{ $t('stepper.CW.selected') }}
</p>
</div>
<div
v-else-if="status==='current'"
class="step-actions"
>
<b-checkbox v-model="copyrightWaiverAgreed">
{{ $t('stepper.CW.copyright-waive-agreement') }}
</b-checkbox>
<textarea
:value="this.$t('cc0-waiver.text')"
:class="'waiver-textarea'"
/>
<b-checkbox v-model="copyrightWaiverConfirmed">
{{ $t("stepper.CW.copyright-waive-confirmation") }}
</b-checkbox>
</div>
</div>
</template>
<script>
export default {
name: 'CopyrightWaiverStep',
props: {
stepId: Number,
stepName: String,
selected: Boolean,
status: {
type: String,
validator(value) {
return ['current', 'previous', 'inactive'].includes(value)
}
}
},
data() {
return {
agreed: false,
confirmed: false
}
},
computed: {
copyrightWaiverAgreed: {
get() {
return this.agreed
},
set() {
this.agreed = !this.agreed
if (this.agreed && this.confirmed) {
this.$emit('change', this.$props.stepName, this.$props.stepId, true)
} else if (!this.agreed) {
this.$emit('change', this.$props.stepName, this.$props.stepId, undefined)
}
}
},
copyrightWaiverConfirmed: {
get() {
return this.confirmed
},
set() {
this.confirmed = !this.confirmed
if (this.agreed && this.confirmed) {
this.$emit('change', this.$props.stepName, this.$props.stepId, true)
} else if (!this.confirmed) {
this.$emit('change', this.$props.stepName, this.$props.stepId, undefined)
}
}
}
}
}
</script>
<style lang="scss">
.waiver-textarea {
width: 100%;
min-height: 100px;
margin: 1rem 0;
}
.step-actions .b-checkbox.checkbox {
align-items: normal;
}
.step-actions .control-label {
color: #333333;
}
.step-actions .b-checkbox.checkbox input[type=checkbox] + .check {
border: 2px solid #D8D8D8;
}
</style>