Skip to content

Commit 99dabe6

Browse files
committed
fix allowEdit in frontend
Signed-off-by: Christian Hartmann <[email protected]>
1 parent 31becb1 commit 99dabe6

File tree

1 file changed

+6
-28
lines changed

1 file changed

+6
-28
lines changed

src/components/SidebarTabs/SettingsSidebarTab.vue

+6-28
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@
2222
{{ t('forms', 'Allow multiple responses per person') }}
2323
</NcCheckboxRadioSwitch>
2424
<NcCheckboxRadioSwitch
25-
v-tooltip="disableAllowEditExplanation"
26-
:checked="allowEdit"
25+
:model-value="form.allowEdit"
2726
type="switch"
28-
:disabled="disableAllowEdit"
29-
@update:checked="onAllowEditChange">
30-
{{ t('forms', 'Allow editing responses per person') }}
27+
@update:model-value="onAllowEditChange">
28+
{{ t('forms', 'Allow editing own responses') }}
3129
</NcCheckboxRadioSwitch>
3230
<NcCheckboxRadioSwitch
3331
:checked="formExpires"
@@ -197,22 +195,13 @@ export default {
197195
* Submit Multiple is disabled, if it cannot be controlled.
198196
*/
199197
disableSubmitMultiple() {
200-
return this.hasPublicLink || this.form.allowEdit || this.form.isAnonymous
198+
return this.hasPublicLink || this.form.isAnonymous
201199
},
202200
disableSubmitMultipleExplanation() {
203201
if (this.disableSubmitMultiple) {
204202
return t(
205203
'forms',
206-
'This can not be controlled, if the form has a public link, stores responses anonymously, or the response can be edited.',
207-
)
208-
}
209-
return ''
210-
},
211-
disableAllowEditExplanation() {
212-
if (this.disableAllowEdit) {
213-
return t(
214-
'forms',
215-
'This can not be controlled, if the form has a public link, stores responses anonymously, or multiple responses are allowed.',
204+
'This can not be controlled, if the form has a public link or stores responses anonymously.',
216205
)
217206
}
218207
return ''
@@ -225,22 +214,11 @@ export default {
225214
)
226215
},
227216

228-
// If disabled, submitMultiple will be casted to false if allowEdit is true, else casted to true
217+
// If disabled, submitMultiple will be casted to true
229218
submitMultiple() {
230-
if (this.disableSubmitMultiple && this.allowEdit) {
231-
return false
232-
}
233219
return this.disableSubmitMultiple || this.form.submitMultiple
234220
},
235221

236-
// If disabled, allowEdit will be casted to false
237-
allowEdit() {
238-
if (this.disableAllowEdit) {
239-
return false
240-
}
241-
return this.form.allowEdit
242-
},
243-
244222
formExpires() {
245223
return this.form.expires !== 0
246224
},

0 commit comments

Comments
 (0)