Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/FormsSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
:placeholder="t('forms', 'Select groups')"
class="forms-settings__creation__multiselect"
label="displayName"
@input="onCreationAllowedGroupsChange" />
@update:modelValue="onCreationAllowedGroupsChange" />
</NcSettingsSection>
<NcSettingsSection
:name="t('forms', 'Confirmation emails')"
Expand Down
6 changes: 3 additions & 3 deletions src/components/Questions/Question.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
:labelOutside="false"
:showTrailingButton="false"
:modelValue="name"
@input="onNameChange">
@update:modelValue="onNameChange">
<template #icon>
<NcIconSvgWrapper :svg="IconIdentifier" />
</template>
Expand Down Expand Up @@ -246,7 +246,7 @@

contentValid: {
type: Boolean,
default: true,

Check warning on line 249 in src/components/Questions/Question.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Boolean prop should only be defaulted to false
},

warningInvalid: {
Expand Down Expand Up @@ -374,8 +374,8 @@
this.$emit('update:description', target.value)
},

onNameChange({ target }) {
this.$emit('update:name', target.value)
onNameChange(name) {
this.$emit('update:name', name)
},

onRequiredChange(isRequired) {
Expand Down
58 changes: 31 additions & 27 deletions src/components/Questions/QuestionFile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,31 @@
</template>
{{ allowedFileTypesLabel }}
</NcActionButton>

<NcActionInput
type="number"
:modelValue="maxAllowedFilesCount"
labelOutside
:label="t('forms', 'Maximum number of files')"
:showTrailingButton="false"
@update:modelValue="onMaxAllowedFilesCountInput" />

<NcActionInput
type="number"
:modelValue="maxFileSizeValue"
labelOutside
:showTrailingButton="false"
:label="t('forms', 'Maximum file size')"
@update:modelValue="onMaxFileSizeValueInput" />

<NcActionInput
type="multiselect"
:modelValue="maxFileSizeUnit"
:options="availableUnits"
required
:clearable="false"
:searchable="false"
@update:modelValue="onMaxFileSizeUnitInput" />
</template>

<template v-else>
Expand All @@ -41,42 +66,17 @@
</NcActionCheckbox>

<NcActionInput
key="allowed-file-extensions-multiselect"
:label="t('forms', 'Custom file extensions')"
type="multiselect"
multiple
taggable
:modelValue="extraSettings?.allowedFileExtensions || []"
:modelValue="allowedFileExtensions"
@option:created="onAllowedFileExtensionsAdded"
@option:deselected="onAllowedFileExtensionsDeleted" />

<NcActionSeparator />
</template>

<template v-if="!allowedFileTypesDialogOpened">
<NcActionInput
type="number"
:modelValue="maxAllowedFilesCount"
labelOutside
:label="t('forms', 'Maximum number of files')"
:showTrailingButton="false"
@input="onMaxAllowedFilesCountInput($event.target.value)" />

<NcActionInput
type="number"
:modelValue="maxFileSizeValue"
labelOutside
:showTrailingButton="false"
:label="t('forms', 'Maximum file size')"
@input="onMaxFileSizeValueInput($event.target.value)" />

<NcActionInput
type="multiselect"
:modelValue="maxFileSizeUnit"
:options="availableUnits"
required
:clearable="false"
@input="onMaxFileSizeUnitInput($event)" />
</template>
</template>

<div class="question__content">
Expand Down Expand Up @@ -238,6 +238,10 @@ export default {
return this.extraSettings?.maxAllowedFilesCount || 1
},

allowedFileExtensions() {
return this.extraSettings?.allowedFileExtensions || []
},

allowedFileTypesLabel() {
const allowedFileTypes = []
if (this.extraSettings?.allowedFileTypes?.length) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Questions/QuestionGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@
<NcInputField
type="number"
:modelValue="plainValues[row.id][column.id]"
@input="
@update:modelValue="
onChangeTextNumber(
row.id,
column.id,
$event.target.value,
$event,
)
" />
</template>
Expand Down Expand Up @@ -112,7 +112,7 @@
<AnswerInput
v-for="(answer, index) in columns"
:key="answer.local ? 'option-local' : answer.id"
ref="input"

Check warning on line 115 in src/components/Questions/QuestionGrid.vue

View workflow job for this annotation

GitHub Actions / NPM lint

'input' is defined as ref, but never used
:answer="answer"
:formId="formId"
:index="index"
Expand Down Expand Up @@ -150,7 +150,7 @@
<AnswerInput
v-for="(answer, index) in rows"
:key="answer.local ? 'option-local' : answer.id"
ref="input"

Check warning on line 153 in src/components/Questions/QuestionGrid.vue

View workflow job for this annotation

GitHub Actions / NPM lint

'input' is defined as ref, but never used
:answer="answer"
:formId="formId"
:index="index"
Expand Down
2 changes: 1 addition & 1 deletion src/components/Questions/QuestionShort.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
ref="regexInput"
:label="t('forms', 'Regular expression for input validation')"
:modelValue="validationRegex"
@input="onInputRegex"
@update:modelValue="onInputRegex"
@submit="onSubmitRegex">
<template #icon>
<NcIconSvgWrapper :svg="IconRegex" />
Expand Down
Loading