petites corrections
This commit is contained in:
parent
11be1386c2
commit
f76c243b8c
@ -38,9 +38,9 @@
|
||||
{{:assign duration=$_POST.duree|intval}}
|
||||
{{:assign noamort=false}}
|
||||
{{/if}}
|
||||
|
||||
{{* enregistrer les infos de l'immobilisation *}}
|
||||
{{:assign key=""|uuid}}
|
||||
|
||||
{{:save
|
||||
key=$key
|
||||
validate_schema="schema.json"
|
||||
@ -51,7 +51,12 @@
|
||||
noamort=$noamort
|
||||
}}
|
||||
|
||||
{{:redirect force="index.html?ok=1&msg=infos"}}
|
||||
{{if $_POST.no_amort}}
|
||||
{{:assign amort=0}}
|
||||
{{else}}
|
||||
{{:assign amort=1}}
|
||||
{{/if}}
|
||||
{{:redirect force="index.html?ok=1&msg=infos&amort=%s"|args:$amort}}
|
||||
{{else}}
|
||||
{{:form_errors}}
|
||||
{{/form}}
|
||||
@ -70,7 +75,7 @@
|
||||
<dl>
|
||||
{{:input id="no_amort" type="checkbox" value=1 name="no_amort" label="Ne pas amortir" default=$checked help="Cocher pour ne pas amortir" onclick="toggleInputs('infos_immo','f_no_amort_1')"}}
|
||||
{{:input type="date" name="date_mes" label="Date de mise en service" disabled=$disabled help="à renseigner uniquement si différente de la date d'acquisition"}}
|
||||
{{:input type="number" name="duree" label="Durée d'amortissement" required=true default=1 disabled=$disabled}}
|
||||
{{:input type="number" name="duree" label="Durée d'amortissement" required=true min=0 default=1 disabled=$disabled}}
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
@ -83,7 +88,6 @@
|
||||
{{* activer/désactiver les champs de saisie *}}
|
||||
<script type="text/javascript">
|
||||
function toggleInputs(idfs, idcb) {
|
||||
console.log("cb=" + idcb);
|
||||
const noamort = document.getElementById(idcb);
|
||||
const fs = document.getElementById(idfs);
|
||||
for (let field of fs.querySelectorAll("input")) {
|
||||
|
@ -81,7 +81,7 @@
|
||||
{{if $duration == null}}
|
||||
{{:linkbutton
|
||||
label="Ajouter infos"
|
||||
href="add_duration.html?immo_id=%s&amort=1"|args:$immo_id
|
||||
href="add_infos.html?immo_id=%s&amort=1"|args:$immo_id
|
||||
shape="help"
|
||||
target="_dialog"
|
||||
}}
|
||||
|
Loading…
Reference in New Issue
Block a user