mirror of https://github.com/gophish/gophish
Fix indentation for group form submit
parent
9ec4dbe917
commit
5ca7744270
|
@ -302,24 +302,24 @@ $(document).ready(function() {
|
||||||
errorFlash("Error fetching campaigns")
|
errorFlash("Error fetching campaigns")
|
||||||
})
|
})
|
||||||
$("#groupForm").submit(function() {
|
$("#groupForm").submit(function() {
|
||||||
// Add row to group table.
|
// Add row to group table.
|
||||||
var newRow = groupTable.row.add([
|
var newRow = groupTable.row.add([
|
||||||
$("#groupSelect").val(),
|
$("#groupSelect").val(),
|
||||||
'<span style="cursor:pointer;"><i class="fa fa-trash-o"></i></span>'
|
'<span style="cursor:pointer;"><i class="fa fa-trash-o"></i></span>'
|
||||||
]).draw().node();
|
]).draw().node();
|
||||||
|
|
||||||
// Set event handler for removing row from group table.
|
// Set event handler for removing row from group table.
|
||||||
$(newRow).on("click", "span>i.fa-trash-o", function() {
|
$(newRow).on("click", "span>i.fa-trash-o", function() {
|
||||||
groupTable.row($(this).parents('tr'))
|
groupTable.row($(this).parents('tr'))
|
||||||
.remove()
|
.remove()
|
||||||
.draw();
|
.draw();
|
||||||
});
|
|
||||||
|
|
||||||
// Clear user input.
|
|
||||||
$("#groupSelect").val("");
|
|
||||||
return false;
|
|
||||||
});
|
});
|
||||||
// Create the group typeahead objects
|
|
||||||
|
// Clear user input.
|
||||||
|
$("#groupSelect").val("");
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
// Create the group typeahead objects
|
||||||
groupTable = $("#groupTable").DataTable({
|
groupTable = $("#groupTable").DataTable({
|
||||||
columnDefs: [{
|
columnDefs: [{
|
||||||
orderable: false,
|
orderable: false,
|
||||||
|
|
Loading…
Reference in New Issue