0001-nanterre-disable-invoice-button-on-submit-23380.patch
static/nanterre/_custom.scss | ||
---|---|---|
255 | 255 |
} |
256 | 256 |
} |
257 | 257 | |
258 |
div.invoices div.buttons { |
|
259 |
margin: 0 0 1ex 1ex; |
|
260 |
} |
|
261 | ||
258 | 262 |
/* fargo */ |
259 | 263 |
div#user-files { |
260 | 264 |
background: white; |
templates/variants/nanterre/combo/json/rsu-frontoffice-factures.html | ||
---|---|---|
95 | 95 | |
96 | 96 |
{% if parameters.paiement_actif %} |
97 | 97 |
{# Adresse pour paiement : <input type="email" name="email" value="{{ request.user.email }}"/> #} |
98 |
<input type="submit" value="Payer les factures sélectionnées"/ disabled="disabled"> |
|
98 |
<div class="buttons"> |
|
99 |
<button name="submit" value="Payer les factures sélectionnées" disabled="disabled">Payer les factures sélectionnées</button> |
|
100 |
</div> |
|
99 | 101 |
</form> |
100 | 102 | |
101 | 103 |
<script> |
... | ... | |
108 | 110 |
}); |
109 | 111 |
$("span#totalamount").text(sum.toFixed(2).replace('.', ',')); |
110 | 112 |
if (sum > 0.0) { |
111 |
$("input:submit").attr("disabled", null);
|
|
113 |
$("button[name=submit]").attr("disabled", null);
|
|
112 | 114 |
} else { |
113 |
$("input:submit").attr("disabled", "disabled");
|
|
115 |
$("button[name=submit]").attr("disabled", "disabled");
|
|
114 | 116 |
} |
115 | 117 |
}); |
116 | 118 |
$("input#checkall").on('click', function (event) { |
117 | 119 |
event.preventDefault(); |
118 | 120 |
$("input[name='num_factures']").click(); |
119 | 121 |
}); |
122 |
// on évite les double-clic en désactivant le bouton au premier clic |
|
123 |
$('form').on('submit', function(event) { |
|
124 |
var $form = $(this); |
|
125 |
$form.addClass('disabled-during-submit'); |
|
126 |
}); |
|
120 | 127 |
}); |
121 | 128 |
</script> |
122 | 129 |
{% endif %} |
123 |
- |