Included preview for new campaign
This commit is contained in:
@@ -158,7 +158,7 @@ func (tapit *Tapit) createCampaign(w http.ResponseWriter, r *http.Request) {
|
||||
http.Error(w, "Bad request", 400)
|
||||
return
|
||||
}
|
||||
if newCampaignJson.Name != "" {
|
||||
if newCampaignJson.Name != "" && newCampaignJson.FromNumber != "" && newCampaignJson.PhonebookId != 0 && newCampaignJson.TextTemplateId != 0 {
|
||||
var newCampaign Campaign
|
||||
|
||||
// populate details to be used later
|
||||
@@ -226,7 +226,7 @@ func (tapit *Tapit) createCampaign(w http.ResponseWriter, r *http.Request) {
|
||||
notifyPopup(w, r, "success", "Successfully added new campaign", newCampaignJson)
|
||||
return
|
||||
} else {
|
||||
notifyPopup(w, r, "failure", "Please enter the campaign name", nil)
|
||||
notifyPopup(w, r, "failure", "Please enter campaign details", nil)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user