<div class="button-group button-label right" id="box-avaliados">
<label class="bg-white"> <i class="fal fa-tally mr-2 text-color"></i> Nota de Corte </label>
<a href="#" class="bg-white dropdown">
<span class="text-default">{{ nota_corte }}</span>
<i class="fa fa-fw fa-angle-down ml-2"></i>
</a>
<form action="{{ path('nota-corte_processa') }}" class="js-prevent-close dropdown-list" method="POST">
<div class="p-2" style="min-width:200px;">
<div class="pb-2 mb-2 border-bottom">
<input type="number" class="input js-nota-corte" placeholder="0 - {{ evs ? 5 : 100 }}" data-from="{{ nota_corte }}" value="{{ nota_corte }}" data-min="0" data-max="{{ evs ? 5 : 100 }}" data-step="{{ evs ? 0.01 : 1 }}" data-postfix="{{ evs ? '' : '%' }}" name="nota_corte">
</div>
<div class="text-right">
<button type="submit" class="button sm"> Aplicar </button>
</div>
</div>
</form>
</div>
<script>
$(document).on({
"click": function(e){
e.stopPropagation();
},
"submit": function(e){
e.preventDefault();
loading(true);
var path = $(this).attr("action");
var nota_corte = $(this).find(".js-nota-corte").val();
$.post(path, {'nota_corte': nota_corte }, function (response) {
if ( response.sucesso === true ) {
window.location.reload();
} else {
loading(false);
$.alert({
// icon: 'fa fa-warning',
title: "Erro",
content: response.mensagem,
type: "red",
buttons: {
ok: {
text: 'OK',
btnClass: 'button red',
keys: ['enter', 'esc']
}
}
});
}
});
}
},".js-prevent-close");
$(".js-nota-corte").ionRangeSlider();
</script>