Skip to content

Commit

Permalink
Update bootstrap.confirm-modal.js
Browse files Browse the repository at this point in the history
prevent double confirmation dialog
  • Loading branch information
christopheg authored Nov 15, 2018
1 parent 41ee8ec commit 7069861
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions js/bootstrap.confirm-modal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
$(function ( $ ) {

$.fn.confirmModal = function() {
$(this).unbind('click');
$(this).click(function(ev) {

template = '<div id="dataConfirmModal" class="modal fade" role="dialog" aria-labelledby="dataConfirmLabel" aria-hidden="true"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><h4 class="modal-title">%%title%%</h4><button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button></div><div class="modal-body"><p>%%message%%</p></div><div class="modal-footer"><a class="btn btn-primary" href="%%btn_href%%" id="data-confirm-ok">%%btn_ok%%</a><a class="btn btn-default" data-dismiss="modal" aria-hidden="true" id="data-confirm-cancel">%%btn_cancel%%</a></div></div></div></div>';
Expand Down

0 comments on commit 7069861

Please sign in to comment.