diff --git a/ghost/admin/app/controllers/tag.js b/ghost/admin/app/controllers/tag.js index ea128b9b55..7e9c130fd6 100644 --- a/ghost/admin/app/controllers/tag.js +++ b/ghost/admin/app/controllers/tag.js @@ -28,12 +28,17 @@ export default Controller.extend({ this._saveTagProperty(propKey, value); }, - toggleDeleteTagModal() { - this.toggleProperty('showDeleteTagModal'); + openDeleteTagModal() { + this.set('showDeleteTagModal', true); + }, + + closeDeleteTagModal() { + this.set('showDeleteTagModal', false); }, deleteTag() { return this.tag.destroyRecord().then(() => { + this.set('showDeleteTagModal', false); return this.transitionToRoute('tags'); }, (error) => { return this.notifications.showAPIError(error, {key: 'tag.delete'}); diff --git a/ghost/admin/app/templates/tag.hbs b/ghost/admin/app/templates/tag.hbs index 30fa660165..7def717a73 100644 --- a/ghost/admin/app/templates/tag.hbs +++ b/ghost/admin/app/templates/tag.hbs @@ -18,7 +18,7 @@ {{#unless this.tag.isNew}} - {{/unless}} @@ -37,6 +37,6 @@ @modal="delete-tag" @model={{this.tag}} @confirm={{action "deleteTag"}} - @close={{action "toggleDeleteTagModal"}} + @close={{action "closeDeleteTagModal"}} @modifier="action wide" /> {{/if}} \ No newline at end of file