This commit is contained in:
MatteoPistorello 2020-10-14 15:40:51 +02:00
commit 50e89fe516
2 changed files with 9 additions and 7 deletions

View File

@ -288,11 +288,11 @@ include $structure->filepath('movimenti.php');
<!-- PULSANTI --> <!-- PULSANTI -->
<div class="row"> <div class="row">
<div class="col-md-12 text-right"> <div class="col-md-12 text-right">
<button type="button" class="btn btn-default hidden" id="modello-button"> <button type="button" class="btn btn-info" disabled id="modello-button">
<i class="fa fa-plus"></i> '.tr('Aggiungi e crea modello').' <i class="fa fa-plus"></i> '.tr('Aggiungi e crea modello').'
</button> </button>
<button type="submit" class="btn btn-primary" id="add-submit"> <button type="submit" class="btn btn-primary" disabled id="add-submit">
<i class="fa fa-plus"></i> '.tr('Aggiungi').' <i class="fa fa-plus"></i> '.tr('Aggiungi').'
</button> </button>
</div> </div>
@ -326,7 +326,7 @@ if ($permetti_modelli) {
var modello_input = globals.prima_nota.modello_input; var modello_input = globals.prima_nota.modello_input;
var id_mastrino_input = globals.prima_nota.id_mastrino_input; var id_mastrino_input = globals.prima_nota.id_mastrino_input;
var modello_button = globals.prima_nota.modello_button; var modello_button = globals.prima_nota.modello_button;
modello_button.removeClass("hidden"); modello_button.prop("disabled", false);
modello_input.change(function() { modello_input.change(function() {
let id_mastrino = modello_input.get(); let id_mastrino = modello_input.get();

View File

@ -219,11 +219,13 @@ function controllaConti() {
}); });
if (continuare) { if (continuare) {
$("#add-submit").removeClass("hide"); $("#add-submit").prop("disabled", false);
$("#btn_crea_modello").removeClass("hide"); $("#modello-button").prop("disabled", false);
$("#save").removeAttr("disabled");
} else { } else {
$("#add-submit").addClass("hide"); $("#add-submit").prop("disabled", true);
$("#btn_crea_modello").addClass("hide"); $("#modello-button").prop("disabled", true);
$("#save").attr("disabled", "true");
} }
return continuare; return continuare;