mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Refuse to delete a card as long as there is link to it
This fixes https://github.com/wekan/wekan/issues/2785.
This commit is contained in:
parent
2691f033cb
commit
b740381a72
2 changed files with 25 additions and 3 deletions
|
|
@ -967,7 +967,12 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
'click .js-delete': Popup.afterConfirm('cardDelete', function() {
|
||||
Popup.close();
|
||||
Cards.remove(this._id);
|
||||
// verify that there are no linked cards
|
||||
if (Cards.find({ linkedId: this._id }).count() === 0) {
|
||||
Cards.remove(this._id);
|
||||
} else {
|
||||
// TODO popup...
|
||||
}
|
||||
Utils.goBoardId(this.boardId);
|
||||
}),
|
||||
'change .js-field-parent-board'(event) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue