diff --git a/intranet/modules/impression/static/impression.js b/intranet/modules/impression/static/impression.js index 15895bba..9a8bcb09 100644 --- a/intranet/modules/impression/static/impression.js +++ b/intranet/modules/impression/static/impression.js @@ -148,11 +148,16 @@ Impression.settings.update = function () { this.getCopies(this.theform.nb_copies); this.getValue(this.theform.agrafage); // Contraintes - if ( - /* ( this.papier != "A4" ) || */ - ( (this.disposition_recto.checked) && (this.nb_pages>50) ) || - ( (this.disposition_rectoverso.checked) && (this.nb_pages>100) )|| - ( (this.disposition_livret.checked) && (this.nb_pages>60) ) + if (Impression.settings.nb_pages > 60) + { this.disableField(this.theform.disposition_livret); + this.theform.disposition_livret.checked = false } + if ( ((this.papier == "A4") && + (( (this.theform.disposition_recto.checked) && (Impression.settings.nb_pages>50) ) || + ( (this.theform.disposition_recto_verso.checked) && (Impression.settings.nb_pages>100) ) )) + || + ((this.papier == "A3") && + (( (this.theform.disposition_recto.checked) && (Impression.settings.nb_pages>30) ) || + ( (this.theform.disposition_recto_verso.checked) && (Impression.settings.nb_pages>60) ) )) ) { this.setValue(this.theform.agrafage, "None");