Skip to content

Commit ba06a39

Browse files
author
lafricain79
committed
refactor: use NcInputField instead of native input for max submissions
1 parent 590b39c commit ba06a39

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/components/SidebarTabs/SettingsSidebarTab.vue

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,13 @@
8686
{{ t('forms', 'Limit number of responses') }}
8787
</NcCheckboxRadioSwitch>
8888
<div v-show="hasMaxSubmissions && !formArchived" class="settings-div--indent">
89-
<input
90-
v-model.number="maxSubmissionsValue"
89+
<NcInputField
90+
v-model="maxSubmissionsValue"
9191
type="number"
92-
min="1"
92+
:min="1"
9393
:disabled="locked"
94-
:placeholder="t('forms', 'Maximum number of responses')"
95-
class="max-submissions__input"
96-
@change="onMaxSubmissionsValueChange" />
94+
:label="t('forms', 'Maximum number of responses')"
95+
@update:model-value="onMaxSubmissionsValueChange" />
9796
<p class="settings-hint">
9897
{{ t('forms', 'Form will be closed automatically when the limit is reached.') }}
9998
</p>
@@ -201,6 +200,7 @@ import { loadState } from '@nextcloud/initial-state'
201200
import moment from '@nextcloud/moment'
202201
import { directive as ClickOutside } from 'v-click-outside'
203202
import NcButton from '@nextcloud/vue/components/NcButton'
203+
import NcInputField from '@nextcloud/vue/components/NcInputField'
204204
import NcCheckboxRadioSwitch from '@nextcloud/vue/components/NcCheckboxRadioSwitch'
205205
import NcDateTimePicker from '@nextcloud/vue/components/NcDateTimePicker'
206206
import NcIconSvgWrapper from '@nextcloud/vue/components/NcIconSvgWrapper'
@@ -213,6 +213,7 @@ import { FormState } from '../../models/Constants.ts'
213213
export default {
214214
components: {
215215
NcButton,
216+
NcInputField,
216217
NcCheckboxRadioSwitch,
217218
NcDateTimePicker,
218219
NcIconSvgWrapper,

0 commit comments

Comments
 (0)