forked from DGNum/gestioCOF
On hook le popup à form.submit()
This commit is contained in:
parent
6406b493a2
commit
966cf6ce15
1 changed files with 7 additions and 3 deletions
|
@ -131,6 +131,7 @@ var django = {
|
|||
{% if not charte %}
|
||||
<script>
|
||||
(function ($) {
|
||||
var charte_ok = false ;
|
||||
function link_charte() {
|
||||
$.confirm({
|
||||
title: 'Charte du BdA',
|
||||
|
@ -149,14 +150,17 @@ var django = {
|
|||
confirmButton: '<span class="glyphicon glyphicon-ok"></span>',
|
||||
cancelButton: '<span class="glyphicon glyphicon-remove"></span>',
|
||||
confirm: function() {
|
||||
charte_ok = true ;
|
||||
$("#bda_form").submit();
|
||||
},
|
||||
});
|
||||
}
|
||||
$(document).ready(function($) {
|
||||
$("#bda-inscr").click(function(e) {
|
||||
$("#bda_form").submit(function(e) {
|
||||
if (!charte_ok) {
|
||||
e.preventDefault();
|
||||
link_charte();
|
||||
}
|
||||
})
|
||||
})
|
||||
})(django.jQuery);
|
||||
|
|
Loading…
Reference in a new issue