Merge pull request #3862 from mstolf/bugfix/3861/inserted-required-property-in-rename-list-field

Inserted required property in the rename list field, to prevent the l…
This commit is contained in:
Julius Härtl
2022-07-26 16:59:30 +02:00
committed by GitHub
2 changed files with 6 additions and 3 deletions

View File

@@ -218,7 +218,7 @@ class StackService {
* @throws BadRequestException
*/
public function create($title, $boardId, $order) {
if ($title === false || $title === null) {
if ($title === false || $title === null || mb_strlen($title) === 0) {
throw new BadRequestException('title must be provided');
}
@@ -295,7 +295,7 @@ class StackService {
throw new BadRequestException('stack id must be a number');
}
if ($title === false || $title === null) {
if ($title === false || $title === null || mb_strlen($title) === 0) {
throw new BadRequestException('title must be provided');
}

View File

@@ -42,7 +42,10 @@
{{ stack.title }}
</h3>
<form v-else @submit.prevent="finishedEdit(stack)">
<input v-model="copiedStack.title" v-focus type="text">
<input v-model="copiedStack.title"
v-focus
type="text"
required="required">
<input v-tooltip="t('deck', 'Add a new list')"
class="icon-confirm"
type="submit"