Améliore form bonus

This commit is contained in:
Emmanuel Viennet 2023-03-19 10:11:19 +01:00
parent 8d453eb42b
commit dc0c20b56d

View File

@ -86,10 +86,15 @@
<script>
function update_bonus_description() {
var query = "/ScoDoc/get_bonus_description/" + $("#configuration_form select")[0].value;
$.get(query, '', function (data) {
$("#bonus_description").html(data);
});
let bonus_name = $("#configuration_form select")[0].value;
if (bonus_name) {
let query = "/ScoDoc/get_bonus_description/" + bonus_name;
$.get(query, '', function (data) {
$("#bonus_description").html(data);
});
} else {
$("#bonus_description").html("pas de bonus défini");
}
}
$(function () {