correction typos
This commit is contained in:
parent
f6eef8897e
commit
6248904bd8
@ -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);
|
||||
}
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -14,7 +14,7 @@
|
||||
<?php continue; ?>
|
||||
{/if}
|
||||
{if $key == 'siret'}
|
||||
<?php
|
||||
<?php
|
||||
if (null === $value) { $value = ""; }
|
||||
$value = implode(' ', str_split($value, 3));
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user