Skip to content

Commit

Permalink
run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
tpokorra committed Dec 31, 2024
1 parent d2993f3 commit aac7b96
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
10 changes: 6 additions & 4 deletions src/components/SidebarTabs/SettingsSidebarTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
@update:checked="onSubmitMultipleChange">
{{ t('forms', 'Allow multiple responses per person') }}
</NcCheckboxRadioSwitch>
<NcCheckboxRadioSwitch v-tooltip="disableAllowEditExplanation"
<NcCheckboxRadioSwitch
v-tooltip="disableAllowEditExplanation"
:checked="allowEdit"
type="switch"
:disabled="disableAllowEdit"
Expand Down Expand Up @@ -211,7 +212,8 @@ export default {
if (this.disableAllowEdit) {
return t(
'forms',
'This can not be controlled, if the form has a public link or stores responses anonymously, or multiple responses are allowed.')
'This can not be controlled, if the form has a public link or stores responses anonymously, or multiple responses are allowed.',
)
}
return ''
},
Expand All @@ -226,15 +228,15 @@ export default {
// If disabled, submitMultiple will be casted to false if allowEdit is true, else casted to true
submitMultiple() {
if (this.disableSubmitMultiple && this.allowEdit) {
return false;
return false
}
return this.disableSubmitMultiple || this.form.submitMultiple
},

// If disabled, allowEdit will be casted to false
allowEdit() {
if (this.disableAllowEdit) {
return false;
return false
}
return this.form.allowEdit
},
Expand Down
28 changes: 17 additions & 11 deletions src/views/Submit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -669,22 +669,28 @@ export default {
try {
if (this.submissionId) {
await axios.post(
generateOcsUrl('apps/forms/api/v3/forms/{id}/submissions/{submissionId}', {
generateOcsUrl(
'apps/forms/api/v3/forms/{id}/submissions/{submissionId}',
{
id: this.form.id,
submissionId: this.submissionId,
},
),
{
answers: this.answers,
shareHash: this.shareHash,
},
)
} else {
await axios.post(
generateOcsUrl('apps/forms/api/v3/forms/{id}/submissions', {
id: this.form.id,
submissionId: this.submissionId
}),
{
answers: this.answers,
shareHash: this.shareHash,
})
} else {
await axios.post(generateOcsUrl('apps/forms/api/v3/forms/{id}/submissions', {
id: this.form.id,
}),
{
answers: this.answers,
shareHash: this.shareHash,
})
},
)
}
this.submitForm = true
this.success = true
Expand Down

0 comments on commit aac7b96

Please sign in to comment.