avoid empty names with required
Signed-off-by: Jakob <jakob.roehrl@web.de>
This commit is contained in:
@@ -48,11 +48,9 @@
|
||||
<label for="new-stack-input-main" class="hidden-visually">Add a new card</label>
|
||||
<input id="new-stack-input-main" v-model="newCardTitle" type="text"
|
||||
class="no-close"
|
||||
placeholder="Add a new card">
|
||||
placeholder="Add a new card" required>
|
||||
|
||||
<input v-tooltip="{content: missingCardName, show: !addNewCardValidation, trigger: 'manual' }"
|
||||
:disabled="!addNewCardValidation"
|
||||
class="icon-confirm"
|
||||
<input class="icon-confirm"
|
||||
type="submit"
|
||||
value="">
|
||||
</form>
|
||||
@@ -87,20 +85,12 @@ export default {
|
||||
return {
|
||||
editing: false,
|
||||
copiedStack: '',
|
||||
newCardTitle: '',
|
||||
missingCardName: t('deck', 'card title must be provided')
|
||||
newCardTitle: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
cardsByStack() {
|
||||
return (id) => this.$store.getters.cardsByStack(id)
|
||||
},
|
||||
addNewCardValidation() {
|
||||
if (this.newCardTitle === '') {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user