mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-02 17:07:01 +01:00
Bugfix: dopo un primo errore, il form delle rate non si salvava più
This commit is contained in:
parent
9f390c3702
commit
034bd44865
@ -179,8 +179,12 @@ $(document).ready(function(){
|
|||||||
$(this).parentsUntil('.box').find('[id*=giorno]').prop('disabled', false);
|
$(this).parentsUntil('.box').find('[id*=giorno]').prop('disabled', false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).on('change', '[id*=percentuale]', function(){
|
||||||
|
$('button[type=submit]').prop( 'disabled', false ).removeClass('disabled');
|
||||||
|
});
|
||||||
|
|
||||||
$('#edit-form').submit(function(event) {
|
$('#edit-form').submit( function(event) {
|
||||||
var tot = 0;
|
var tot = 0;
|
||||||
|
|
||||||
$(this).find('[id*=percentuale]').each(function(){
|
$(this).find('[id*=percentuale]').each(function(){
|
||||||
@ -190,9 +194,12 @@ $(document).ready(function(){
|
|||||||
tot += prc;
|
tot += prc;
|
||||||
});
|
});
|
||||||
|
|
||||||
if(tot != 100) {
|
if( tot != 100) {
|
||||||
$('#wait').removeClass("hide");
|
$('#wait').removeClass("hide");
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
} else {
|
||||||
|
$('#wait').addClass("hide");
|
||||||
|
$(this).unbind('submit').submit();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user