diff --git a/client/components/boards/boardsList.js b/client/components/boards/boardsList.js index 69a29b3c2..dbdd3789c 100644 --- a/client/components/boards/boardsList.js +++ b/client/components/boards/boardsList.js @@ -239,34 +239,41 @@ BlazeComponent.extendComponent({ evt.preventDefault(); }, 'click .js-clone-board'(evt) { - let title = getSlug(ReactiveCache.getBoard(this.currentData()._id).title) || 'cloned-board'; - Meteor.call( - 'copyBoard', - this.currentData()._id, - { - sort: ReactiveCache.getBoards({ archived: false }).length, - type: 'board', - title: ReactiveCache.getBoard(this.currentData()._id).title, - }, - (err, res) => { - if (err) { - console.error(err); - } else { - Session.set('fromBoard', null); - subManager.subscribe('board', res, false); - FlowRouter.go('board', { - id: res, - slug: title, - }); - } - }, - ); - evt.preventDefault(); + if (confirm('Are you sure you want to clone this board?')) { + let title = + getSlug(ReactiveCache.getBoard(this.currentData()._id).title) || + 'cloned-board'; + Meteor.call( + 'copyBoard', + this.currentData()._id, + { + sort: ReactiveCache.getBoards({ archived: false }).length, + type: 'board', + title: ReactiveCache.getBoard(this.currentData()._id).title, + }, + (err, res) => { + if (err) { + console.error(err); + } else { + Session.set('fromBoard', null); + subManager.subscribe('board', res, false); + FlowRouter.go('board', { + id: res, + slug: title, + }); + } + }, + ); + evt.preventDefault(); + } }, 'click .js-archive-board'(evt) { - const boardId = this.currentData()._id; + if (confirm('Are you sure you want to archive this board?')) + { + const boardId = this.currentData()._id; Meteor.call('archiveBoard', boardId); evt.preventDefault(); + } }, 'click .js-accept-invite'() { const boardId = this.currentData()._id;