Make the subscribe button work correctly

This commit is contained in:
Phil Hughes 2016-10-07 09:38:35 +01:00
parent 7d20a91b2e
commit e457161498
2 changed files with 7 additions and 2 deletions

View File

@ -1,4 +1,6 @@
(() => {
const Store = gl.issueBoards.BoardsStore;
window.gl = window.gl || {};
gl.issueBoards.BoardNewIssue = Vue.extend({
@ -27,13 +29,16 @@
const labels = this.list.label ? [this.list.label] : [];
const issue = new ListIssue({
title: this.title,
labels
labels,
subscribed: true
});
this.list.newIssue(issue)
.then((data) => {
// Need this because our jQuery very kindly disables buttons on ALL form submissions
$(this.$els.submitButton).enable();
Store.detail.issue = issue;
})
.catch(() => {
// Need this because our jQuery very kindly disables buttons on ALL form submissions

View File

@ -4,7 +4,7 @@ class ListIssue {
this.title = obj.title;
this.confidential = obj.confidential;
this.dueDate = obj.due_date;
this.subscribed = true;
this.subscribed = obj.subscribed;
this.labels = [];
if (obj.assignee) {