correction typos

This commit is contained in:
Jean-Christophe Engel 2024-10-19 14:32:41 +02:00
parent f6eef8897e
commit 6248904bd8
4 changed files with 13 additions and 13 deletions

View File

@ -48,11 +48,11 @@ $tpl->register_function('money_fac', function (array $params)
if (!isset($user)) {
$user = false;
}
}
if (!isset($name))
{
$name = 'prix[]';
$name = 'prix[]';
}
if (null !== $current_value && !$user) {
@ -62,7 +62,7 @@ $tpl->register_function('money_fac', function (array $params)
if (null !== $current_value) {
$current_value = htmlspecialchars($current_value, ENT_QUOTES, 'UTF-8');
}
$currency = Config::getInstance()->get('monnaie');
return sprintf('<td><nobr><input type="text" pattern="[0-9]*([.,][0-9]{1,2})?" inputmode="decimal" size="8" class="money" style="width: 60%%" onchange="updateSum();" name="%s" value="%s" /><b>%s</b></nobr></td>', $name, $current_value, $currency);
}

View File

@ -49,7 +49,7 @@
</div>
<dt><label>Statut</label></dt>
{input type="checkbox" name="reglee" value="1" label="Réglée" source=$doc data-types="t1"}
<div data-types="t0 t1 t2">
{input type="checkbox" name="archivee" value="1" label="Archivée" source=$doc disabled="disabled"}
@ -113,14 +113,14 @@
<td class="fact_rm_line">{button label="Enlever" title="Enlever la ligne" shape="minus" min="2" name="remove_line"}</td>
</tr>
{foreach from=$designations item=designation key=key}
{foreach from=$designations item=designation key=key}
<tr>
<td><textarea name="designation[]" style="width:98%;">{$designation}</textarea></td>
{money_fac value=$prix[$key] user=$from_user}
<td class="fact_rm_line">{button label="Enlever" title="Enlever la ligne" shape="minus" min="2" name="remove_line"}</td>
</tr>
{/foreach}
{else}
{else}
<tr id="Line1" class="hidden">
<td><textarea name="designation_tpl[]" style="width:98%;"></textarea></td>
{money_fac name="prix_tpl[]"}
@ -139,7 +139,7 @@
</dd>
</dl>
</fieldset>
<fieldset data-types="t2">
<legend>Contenu</legend>
<dl>

View File

@ -19,8 +19,8 @@
function plus(){
var newdiv = document.createElement('tr');
newdiv.innerHTML = document.getElementById('Line1').innerHTML;
newdiv.getElementsByTagName('textarea')[0].setAttribute('name', 'designation[]');
newdiv.getElementsByTagName('input')[0].setAttribute('name', 'prix[]');
newdiv.getElementsByTagName('textarea')[0].setAttribute('name', 'designation[]');
newdiv.getElementsByTagName('input')[0].setAttribute('name', 'prix[]');
newdiv.querySelector('.fact_rm_line button').onclick = function(){
this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode);
updateSum();
@ -33,12 +33,12 @@
$('#ajouter_ligne').onclick = plus;
a = document.querySelectorAll('[name="remove_line"]');
a = document.querySelectorAll('[name="remove_line"]');
l = a.length;
for(i = 0; i < l; i++) {
a[i].onclick = function(){
this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode);
updateSum();
updateSum();
};
}
@ -99,4 +99,4 @@
hideAllTypes();
{/literal}
selectType({$radio.type});
</script>
</script>

View File

@ -14,7 +14,7 @@
<?php continue; ?>
{/if}
{if $key == 'siret'}
<?php
<?php
if (null === $value) { $value = ""; }
$value = implode(' ', str_split($value, 3));
?>