mirror of
https://github.com/wekan/wekan.git
synced 2026-01-31 05:35:16 +01:00
Prevent dublicated empty labels of the same color
This commit is contained in:
parent
ab761f1186
commit
43de3b8a01
2 changed files with 15 additions and 6 deletions
|
|
@ -69,12 +69,12 @@ Template.formLabel.events({
|
|||
Template.createLabelPopup.events({
|
||||
// Create the new label
|
||||
'submit .create-label'(evt, tpl) {
|
||||
evt.preventDefault();
|
||||
const board = Boards.findOne(Session.get('currentBoard'));
|
||||
const name = tpl.$('#labelName').val().trim();
|
||||
const color = Blaze.getData(tpl.find('.fa-check')).color;
|
||||
board.addLabel(name, color);
|
||||
Popup.back();
|
||||
evt.preventDefault();
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue