55
66<template >
77 <div class =" sidebar-tabs__content" >
8+ <NcNoteCard
9+ v-if =" locked "
10+ type="info"
11+ :heading =" t (' forms' , ' Form is locked' )"
12+ :text ="
13+ t (' forms' , ' Lock by {lockedBy} expires {lockedUntil}' , {
14+ lockedBy ,
15+ lockedUntil:
16+ lockedUntil === ' ' ? t (' forms' , ' never' ) : lockedUntil ,
17+ })
18+ " />
819 <NcCheckboxRadioSwitch
920 :checked =" form .isAnonymous "
10- :disabled =" formArchived "
21+ :disabled =" formArchived || locked "
1122 type="switch"
1223 @update :checked =" onAnonChange " >
1324 <!-- TRANSLATORS Checkbox to select whether responses will be stored anonymously or not -->
1627 <NcCheckboxRadioSwitch
1728 v-tooltip =" disableSubmitMultipleExplanation "
1829 :checked =" submitMultiple "
19- :disabled =" disableSubmitMultiple || formArchived "
30+ :disabled =" disableSubmitMultiple || formArchived || locked "
2031 type="switch"
2132 @update :checked =" onSubmitMultipleChange " >
2233 {{ t('forms', 'Allow multiple responses per person') }}
2334 </NcCheckboxRadioSwitch >
2435 <NcCheckboxRadioSwitch
2536 :model-value =" form .allowEditSubmissions "
26- :disabled =" formArchived "
37+ :disabled =" formArchived || locked "
2738 type="switch"
2839 @update :model-value =" onAllowEditSubmissionsChange " >
2940 {{ t('forms', 'Allow editing own responses') }}
3041 </NcCheckboxRadioSwitch >
3142 <NcCheckboxRadioSwitch
3243 :checked =" formExpires "
33- :disabled =" formArchived "
44+ :disabled =" formArchived || locked "
3445 type="switch"
3546 @update :checked =" onFormExpiresChange " >
3647 {{ t('forms', 'Set expiration date') }}
3950 <NcDateTimePicker
4051 id="expiresDatetimePicker"
4152 :clearable =" false "
53+ :disabled =" locked "
4254 :disabled-date =" notBeforeToday "
4355 :disabled-time =" notBeforeNow "
4456 :editable =" false "
5062 @change =" onExpirationDateChange " />
5163 <NcCheckboxRadioSwitch
5264 :checked =" form .showExpiration "
65+ :disabled =" locked "
5366 type="switch"
5467 @update :checked =" onShowExpirationChange " >
5568 {{ t('forms', 'Show expiration date on form') }}
5669 </NcCheckboxRadioSwitch >
5770 </div >
5871 <NcCheckboxRadioSwitch
5972 :checked =" formClosed "
60- :disabled =" formArchived "
73+ :disabled =" formArchived || locked "
6174 aria-describedby="forms-settings__close-form"
6275 type="switch"
6376 @update :checked =" onFormClosedChange " >
6982 <NcCheckboxRadioSwitch
7083 :checked =" formArchived "
7184 aria-describedby="forms-settings__archive-form"
85+ :disabled =" locked "
7286 type="switch"
7387 @update :checked =" onFormArchivedChange " >
7488 {{ t('forms', 'Archive form') }}
8397 </p >
8498 <NcCheckboxRadioSwitch
8599 :checked =" hasCustomSubmissionMessage "
86- :disabled =" formArchived "
100+ :disabled =" formArchived || locked "
87101 type="switch"
88102 @update :checked =" onUpdateHasCustomSubmissionMessage " >
89103 {{ t('forms', 'Custom submission message') }}
103117 aria-describedby =" forms-submission-message-description"
104118 :aria-label =" t('forms', 'Custom submission message')"
105119 :value =" form.submissionMessage"
120+ :disabled =" locked"
106121 :maxlength =" maxStringLengths.submissionMessage"
107122 :placeholder ="
108123 t(
132147 </div >
133148 </div >
134149
135- <TransferOwnership :form =" form " />
150+ <TransferOwnership :locked = " locked " : form =" form " />
136151 </div >
137152</template >
138153
139154<script >
140155import moment from ' @nextcloud/moment'
141156import NcCheckboxRadioSwitch from ' @nextcloud/vue/components/NcCheckboxRadioSwitch'
142157import NcDateTimePicker from ' @nextcloud/vue/components/NcDateTimePicker'
158+ import NcNoteCard from ' @nextcloud/vue/components/NcNoteCard'
143159import ShareTypes from ' ../../mixins/ShareTypes.js'
144160import TransferOwnership from ' ./TransferOwnership.vue'
145161
@@ -151,6 +167,7 @@ export default {
151167 components: {
152168 NcCheckboxRadioSwitch,
153169 NcDateTimePicker,
170+ NcNoteCard,
154171 TransferOwnership,
155172 },
156173
@@ -167,6 +184,21 @@ export default {
167184 type: Object ,
168185 required: true ,
169186 },
187+
188+ locked: {
189+ type: Boolean ,
190+ required: true ,
191+ },
192+
193+ lockedBy: {
194+ type: String ,
195+ default: ' ' ,
196+ },
197+
198+ lockedUntil: {
199+ type: String ,
200+ default: ' ' ,
201+ },
170202 },
171203
172204 data () {
@@ -386,7 +418,6 @@ export default {
386418.sidebar - tabs__content {
387419 display: flex;
388420 flex- direction: column;
389- gap: 8px ;
390421}
391422.submission - message {
392423 & __description {
0 commit comments