diff --git a/src/app/formulaire/definition/form-section.ts b/src/app/formulaire/definition/form-section.ts index bd1685b44c8920d423ede9930f811fd0255fe884..db63b5a1d681ce99de03d12fe0a2154630dd4c4d 100644 --- a/src/app/formulaire/definition/form-section.ts +++ b/src/app/formulaire/definition/form-section.ts @@ -1,5 +1,6 @@ import { FormulaireFixedVar } from "./form-fixedvar"; import { FieldSet } from "../elements/fieldset"; +import { ServiceFactory } from "../../services/service-factory"; import { IObservable, Session, SectionNub } from "jalhyd"; @@ -17,6 +18,11 @@ export class FormulaireSection extends FormulaireFixedVar { // show / hide dependent fields fs.updateFields(); } + // empty fields ? only those belonging to the specific section type + if (ServiceFactory.instance.applicationSetupService.enableEmptyFieldsOnFormInit) { + // "LargeurBerge" is hackily used as LargeurFond in Rectangular and Trapez sections, omit it here + this.emptyFields([ "Ks", "Q", "If", "YB", "iPrec", "Y" ]); + } this.reset(); } }