Fixed bug when copying campaign.

Fixes #549
Fixes #898
1205-drop-campaigns
Jordan Wright 2018-10-03 15:00:08 -05:00
parent c9e800dda7
commit a0c1860a0a
2 changed files with 7 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -254,21 +254,24 @@ function copy(idx) {
placeholder: campaign.template.name
});
} else {
$("#template").select2("val", campaign.template.id.toString());
$("#template").val(campaign.template.id.toString());
$("#template").trigger("change.select2")
}
if (!campaign.page.id) {
$("#page").select2({
placeholder: campaign.page.name
});
} else {
$("#page").select2("val", campaign.page.id.toString());
$("#page").val(campaign.page.id.toString());
$("#page").trigger("change.select2")
}
if (!campaign.smtp.id) {
$("#profile").select2({
placeholder: campaign.smtp.name
});
} else {
$("#profile").select2("val", campaign.smtp.id.toString());
$("#profile").val(campaign.smtp.id.toString());
$("#profile").trigger("change.select2")
}
$("#url").val(campaign.url)
})