Commit d1c6101
lafricain79
feat: add maximum submissions limit for forms
Add the ability to limit the number of responses a form can receive.
When the limit is reached, the form is automatically closed and displays
a dedicated message instead of accepting new submissions.
- Add max_submissions column to forms_v2_forms table (migration)
- Add maxSubmissions property to Form entity
- Check submission limit in FormsService::canSubmit()
- Add limit enforcement in ApiController::newSubmission()
- Add isMaxSubmissionsReached flag in form API response
- Add limit settings UI in SettingsSidebarTab
- Display dedicated 'Form is full' message in Submit view
- Add French translations for new strings
Closes #596
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Update src/components/SidebarTabs/SettingsSidebarTab.vue
Co-authored-by: Christian Hartmann <chris-hartmann@gmx.de>
Signed-off-by: L'Africain <fr.cyrille@tiberiade.be>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Update src/components/SidebarTabs/SettingsSidebarTab.vue
Co-authored-by: Christian Hartmann <chris-hartmann@gmx.de>
Signed-off-by: L'Africain <fr.cyrille@tiberiade.be>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Update src/views/Submit.vue
Co-authored-by: Christian Hartmann <chris-hartmann@gmx.de>
Signed-off-by: L'Africain <fr.cyrille@tiberiade.be>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
fix: revert manual changes to l10n files
Signed-off-by: lafricain79 <lafricain79@gmail.com>
refactor: move schema change to a new migration file
Signed-off-by: lafricain79 <lafricain79@gmail.com>
fix: treat zero and null as unlimited for max submissions
Signed-off-by: lafricain79 <lafricain79@gmail.com>
refactor: remove default value and custom CSS for max submissions input
Signed-off-by: lafricain79 <lafricain79@gmail.com>
fix: set default value to 1 when enabling max submissions
Signed-off-by: lafricain79 <lafricain79@gmail.com>
refactor: use NcInputField instead of native input for max submissions
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Update lib/Migration/Version050300Date20260303000000.php
Co-authored-by: Christian Hartmann <chris-hartmann@gmx.de>
Signed-off-by: L'Africain <fr.cyrille@tiberiade.be>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Update lib/Service/FormsService.php
Co-authored-by: Christian Hartmann <chris-hartmann@gmx.de>
Signed-off-by: L'Africain <fr.cyrille@tiberiade.be>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Update lib/Controller/ApiController.php
Co-authored-by: Christian Hartmann <chris-hartmann@gmx.de>
Signed-off-by: L'Africain <fr.cyrille@tiberiade.be>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Update lib/Controller/ApiController.php
Co-authored-by: Christian Hartmann <chris-hartmann@gmx.de>
Signed-off-by: L'Africain <fr.cyrille@tiberiade.be>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
fix: add maxSubmissions and isMaxSubmissionsReached to FormsForm psalm type
Signed-off-by: lafricain79 <lafricain79@gmail.com>
fix: fix ESLint formatting issues
Signed-off-by: lafricain79 <lafricain79@gmail.com>
fix: fix PHP CS formatting in migration file
Signed-off-by: lafricain79 <lafricain79@gmail.com>
fix: update unit tests to include maxSubmissions and isMaxSubmissionsReached fields
Signed-off-by: lafricain79 <lafricain79@gmail.com>
fix: fix remaining ESLint errors
Signed-off-by: lafricain79 <lafricain79@gmail.com>
fix: update FormsMigratorTest to include maxSubmissions field
Signed-off-by: lafricain79 <lafricain79@gmail.com>
fix: require explicit intent for option creation (IME safe)
Signed-off-by: don9x2E <revan@kakao.com>
fix: Improve validation for submission answers with strict type checking
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Chore(deps): Bump immutable from 5.1.4 to 5.1.5
Bumps [immutable](https://github.com/immutable-js/immutable-js) from 5.1.4 to 5.1.5.
- [Release notes](https://github.com/immutable-js/immutable-js/releases)
- [Changelog](https://github.com/immutable-js/immutable-js/blob/main/CHANGELOG.md)
- [Commits](immutable-js/immutable-js@v5.1.4...v5.1.5)
---
updated-dependencies:
- dependency-name: immutable
dependency-version: 5.1.5
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
chore: Support NC34
Signed-off-by: nfebe <fenn25.fn@gmail.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Chore(deps): Bump dompurify from 3.3.1 to 3.3.2
Bumps [dompurify](https://github.com/cure53/DOMPurify) from 3.3.1 to 3.3.2.
- [Release notes](https://github.com/cure53/DOMPurify/releases)
- [Commits](cure53/DOMPurify@3.3.1...3.3.2)
---
updated-dependencies:
- dependency-name: dompurify
dependency-version: 3.3.2
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
v5.2.5 changelog
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Chore(deps): Bump actions/setup-node from 6.2.0 to 6.3.0
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](actions/setup-node@6044e13...53b8394)
---
updated-dependencies:
- dependency-name: actions/setup-node
dependency-version: 6.3.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Chore(deps-dev): Bump @vue/tsconfig from 0.5.1 to 0.9.0
Bumps [@vue/tsconfig](https://github.com/vuejs/tsconfig) from 0.5.1 to 0.9.0.
- [Release notes](https://github.com/vuejs/tsconfig/releases)
- [Commits](vuejs/tsconfig@v0.5.1...v0.9.0)
---
updated-dependencies:
- dependency-name: "@vue/tsconfig"
dependency-version: 0.9.0
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Chore(deps): Bump phpoffice/phpspreadsheet from 5.4.0 to 5.5.0
Bumps [phpoffice/phpspreadsheet](https://github.com/PHPOffice/PhpSpreadsheet) from 5.4.0 to 5.5.0.
- [Release notes](https://github.com/PHPOffice/PhpSpreadsheet/releases)
- [Changelog](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/CHANGELOG.md)
- [Commits](PHPOffice/PhpSpreadsheet@5.4.0...5.5.0)
---
updated-dependencies:
- dependency-name: phpoffice/phpspreadsheet
dependency-version: 5.5.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
Revert "Chore(deps-dev): Bump @vue/tsconfig from 0.5.1 to 0.9.0"
This reverts commit cf200d1.
Signed-off-by: lafricain79 <lafricain79@gmail.com>
fix(a11y): Prevent escaping of aria-labels in QuestionLong and QuestionShort components
Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
Signed-off-by: lafricain79 <lafricain79@gmail.com>
fix: update integration tests to include maxSubmissions and isMaxSubmissionsReached fields
Signed-off-by: lafricain79 <lafricain79@gmail.com>
fix: regenerate openapi.json
Signed-off-by: lafricain79 <lafricain79@gmail.com>
fix: resolve merge conflict in AnswerInput.vue
Signed-off-by: lafricain79 <lafricain79@gmail.com>1 parent b68b1b6 commit d1c6101
32 files changed
Lines changed: 359 additions & 50 deletions
File tree
- .github/workflows
- appinfo
- l10n
- lib
- Controller
- Db
- Migration
- Service
- playwright/e2e
- src
- components
- Questions
- SidebarTabs
- mixins
- views
- tests
- Integration/Api
- Unit
- Controller
- Service
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
8 | 25 | | |
9 | 26 | | |
10 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
86 | 87 | | |
| 88 | + | |
| 89 | + | |
87 | 90 | | |
| 91 | + | |
| 92 | + | |
88 | 93 | | |
89 | 94 | | |
90 | 95 | | |
| |||
121 | 126 | | |
122 | 127 | | |
123 | 128 | | |
| 129 | + | |
124 | 130 | | |
125 | 131 | | |
126 | 132 | | |
| |||
226 | 232 | | |
227 | 233 | | |
228 | 234 | | |
| 235 | + | |
229 | 236 | | |
230 | 237 | | |
231 | 238 | | |
| |||
306 | 313 | | |
307 | 314 | | |
308 | 315 | | |
| 316 | + | |
| 317 | + | |
309 | 318 | | |
310 | 319 | | |
311 | 320 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
84 | 85 | | |
| 86 | + | |
| 87 | + | |
85 | 88 | | |
| 89 | + | |
| 90 | + | |
86 | 91 | | |
87 | 92 | | |
88 | 93 | | |
| |||
119 | 124 | | |
120 | 125 | | |
121 | 126 | | |
| 127 | + | |
122 | 128 | | |
123 | 129 | | |
124 | 130 | | |
| |||
224 | 230 | | |
225 | 231 | | |
226 | 232 | | |
| 233 | + | |
227 | 234 | | |
228 | 235 | | |
229 | 236 | | |
| |||
304 | 311 | | |
305 | 312 | | |
306 | 313 | | |
| 314 | + | |
| 315 | + | |
307 | 316 | | |
308 | 317 | | |
309 | 318 | | |
| |||
0 commit comments