mirror of https://github.com/gophish/gophish
Moved modal closing to hide.bs.modal - Fixes #71
parent
86e0255ae6
commit
65005a2805
|
@ -25,6 +25,7 @@ function save(idx){
|
||||||
successFlash("Group updated successfully!")
|
successFlash("Group updated successfully!")
|
||||||
load()
|
load()
|
||||||
dismiss()
|
dismiss()
|
||||||
|
$("#modal").modal('hide')
|
||||||
})
|
})
|
||||||
.error(function(data){
|
.error(function(data){
|
||||||
modalError(data.responseJSON.message)
|
modalError(data.responseJSON.message)
|
||||||
|
@ -37,6 +38,7 @@ function save(idx){
|
||||||
successFlash("Group added successfully!")
|
successFlash("Group added successfully!")
|
||||||
load()
|
load()
|
||||||
dismiss()
|
dismiss()
|
||||||
|
$("#modal").modal('hide')
|
||||||
})
|
})
|
||||||
.error(function(data){
|
.error(function(data){
|
||||||
modalError(data.responseJSON.message)
|
modalError(data.responseJSON.message)
|
||||||
|
@ -48,7 +50,6 @@ function dismiss(){
|
||||||
$("#targetsTable").dataTable().DataTable().clear().draw()
|
$("#targetsTable").dataTable().DataTable().clear().draw()
|
||||||
$("#name").val("")
|
$("#name").val("")
|
||||||
$("#modal\\.flashes").empty()
|
$("#modal\\.flashes").empty()
|
||||||
$("#modal").modal('hide')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function edit(idx){
|
function edit(idx){
|
||||||
|
@ -176,4 +177,7 @@ $(document).ready(function(){
|
||||||
.remove()
|
.remove()
|
||||||
.draw();
|
.draw();
|
||||||
})
|
})
|
||||||
|
$("#modal").on("hide.bs.modal", function(){
|
||||||
|
dismiss()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -107,7 +107,7 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default" onclick="dismiss()">Close</button>
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||||
<button type="button" class="btn btn-primary" id="modalSubmit">Save changes</button>
|
<button type="button" class="btn btn-primary" id="modalSubmit">Save changes</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue