mirror of https://github.com/gophish/gophish
Added better handling of the "Include Tracking Image" option
parent
8a3f990d1f
commit
78f378fc28
|
@ -28,6 +28,9 @@ function save(idx) {
|
||||||
template.html.indexOf("{{.Tracker}}") == -1 &&
|
template.html.indexOf("{{.Tracker}}") == -1 &&
|
||||||
template.html.indexOf("{{.TrackingUrl}}") == -1) {
|
template.html.indexOf("{{.TrackingUrl}}") == -1) {
|
||||||
template.html = template.html.replace("</body>", "{{.Tracker}}</body>")
|
template.html = template.html.replace("</body>", "{{.Tracker}}</body>")
|
||||||
|
} else {
|
||||||
|
// Otherwise, remove the tracker
|
||||||
|
template.html = template.html.replace("{{.Tracker}}</body>", "</body>")
|
||||||
}
|
}
|
||||||
template.text = $("#text_editor").val()
|
template.text = $("#text_editor").val()
|
||||||
// Add the attachments
|
// Add the attachments
|
||||||
|
@ -157,6 +160,11 @@ function edit(idx) {
|
||||||
file.type || "application/octet-stream"
|
file.type || "application/octet-stream"
|
||||||
]).draw()
|
]).draw()
|
||||||
})
|
})
|
||||||
|
if (template.html.indexOf("{{.Tracker}}</body>") != -1) {
|
||||||
|
$("#use_tracker_checkbox").prop("checked", true)
|
||||||
|
} else {
|
||||||
|
$("#use_tracker_checkbox").prop("checked", false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Handle Deletion
|
// Handle Deletion
|
||||||
$("#attachmentsTable").unbind('click').on("click", "span>i.fa-trash-o", function() {
|
$("#attachmentsTable").unbind('click').on("click", "span>i.fa-trash-o", function() {
|
||||||
|
|
Loading…
Reference in New Issue