mirror of https://github.com/gophish/gophish
Merge pull request #86 from gophish/81-campaign-launch-button
Changed button on campaign to say "Launch Campaign". Fixes #81pull/91/head
commit
92e3d2a4fd
|
@ -11,7 +11,10 @@ var labels = {
|
||||||
var campaigns = []
|
var campaigns = []
|
||||||
|
|
||||||
// Save attempts to POST to /campaigns/
|
// Save attempts to POST to /campaigns/
|
||||||
function save() {
|
function launch() {
|
||||||
|
if (!confirm("This will launch the campaign. Are you sure?")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
groups = []
|
groups = []
|
||||||
$.each($("#groupTable").DataTable().rows().data(), function(i, group) {
|
$.each($("#groupTable").DataTable().rows().data(), function(i, group) {
|
||||||
groups.push({
|
groups.push({
|
||||||
|
@ -58,7 +61,7 @@ function deleteCampaign(idx) {
|
||||||
api.campaignId.delete(campaigns[idx].id)
|
api.campaignId.delete(campaigns[idx].id)
|
||||||
.success(function(data) {
|
.success(function(data) {
|
||||||
successFlash(data.message)
|
successFlash(data.message)
|
||||||
location.reload()
|
location.reload()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,7 +105,7 @@ function edit(campaign) {
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
api.campaigns.get()
|
api.campaigns.get()
|
||||||
.success(function(cs) {
|
.success(function(cs) {
|
||||||
campaigns = cs
|
campaigns = cs
|
||||||
$("#loading").hide()
|
$("#loading").hide()
|
||||||
if (campaigns.length > 0) {
|
if (campaigns.length > 0) {
|
||||||
$("#campaignTable").show()
|
$("#campaignTable").show()
|
||||||
|
|
|
@ -121,7 +121,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||||
<button type="button" class="btn btn-primary" onclick="save()">Save changes</button>
|
<button type="button" class="btn btn-primary" onclick="launch()"><i class="fa fa-envelope"></i> Launch Campaign</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue