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)) {
|
if (!isset($user)) {
|
||||||
$user = false;
|
$user = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($name))
|
if (!isset($name))
|
||||||
{
|
{
|
||||||
$name = 'prix[]';
|
$name = 'prix[]';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (null !== $current_value && !$user) {
|
if (null !== $current_value && !$user) {
|
||||||
|
@ -62,7 +62,7 @@ $tpl->register_function('money_fac', function (array $params)
|
||||||
if (null !== $current_value) {
|
if (null !== $current_value) {
|
||||||
$current_value = htmlspecialchars($current_value, ENT_QUOTES, 'UTF-8');
|
$current_value = htmlspecialchars($current_value, ENT_QUOTES, 'UTF-8');
|
||||||
}
|
}
|
||||||
|
|
||||||
$currency = Config::getInstance()->get('monnaie');
|
$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);
|
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>
|
</div>
|
||||||
|
|
||||||
<dt><label>Statut</label></dt>
|
<dt><label>Statut</label></dt>
|
||||||
|
|
||||||
{input type="checkbox" name="reglee" value="1" label="Réglée" source=$doc data-types="t1"}
|
{input type="checkbox" name="reglee" value="1" label="Réglée" source=$doc data-types="t1"}
|
||||||
<div data-types="t0 t1 t2">
|
<div data-types="t0 t1 t2">
|
||||||
{input type="checkbox" name="archivee" value="1" label="Archivée" source=$doc disabled="disabled"}
|
{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>
|
<td class="fact_rm_line">{button label="Enlever" title="Enlever la ligne" shape="minus" min="2" name="remove_line"}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
{foreach from=$designations item=designation key=key}
|
{foreach from=$designations item=designation key=key}
|
||||||
<tr>
|
<tr>
|
||||||
<td><textarea name="designation[]" style="width:98%;">{$designation}</textarea></td>
|
<td><textarea name="designation[]" style="width:98%;">{$designation}</textarea></td>
|
||||||
{money_fac value=$prix[$key] user=$from_user}
|
{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>
|
<td class="fact_rm_line">{button label="Enlever" title="Enlever la ligne" shape="minus" min="2" name="remove_line"}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
{else}
|
{else}
|
||||||
<tr id="Line1" class="hidden">
|
<tr id="Line1" class="hidden">
|
||||||
<td><textarea name="designation_tpl[]" style="width:98%;"></textarea></td>
|
<td><textarea name="designation_tpl[]" style="width:98%;"></textarea></td>
|
||||||
{money_fac name="prix_tpl[]"}
|
{money_fac name="prix_tpl[]"}
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset data-types="t2">
|
<fieldset data-types="t2">
|
||||||
<legend>Contenu</legend>
|
<legend>Contenu</legend>
|
||||||
<dl>
|
<dl>
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
function plus(){
|
function plus(){
|
||||||
var newdiv = document.createElement('tr');
|
var newdiv = document.createElement('tr');
|
||||||
newdiv.innerHTML = document.getElementById('Line1').innerHTML;
|
newdiv.innerHTML = document.getElementById('Line1').innerHTML;
|
||||||
newdiv.getElementsByTagName('textarea')[0].setAttribute('name', 'designation[]');
|
newdiv.getElementsByTagName('textarea')[0].setAttribute('name', 'designation[]');
|
||||||
newdiv.getElementsByTagName('input')[0].setAttribute('name', 'prix[]');
|
newdiv.getElementsByTagName('input')[0].setAttribute('name', 'prix[]');
|
||||||
newdiv.querySelector('.fact_rm_line button').onclick = function(){
|
newdiv.querySelector('.fact_rm_line button').onclick = function(){
|
||||||
this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode);
|
this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode);
|
||||||
updateSum();
|
updateSum();
|
||||||
|
@ -33,12 +33,12 @@
|
||||||
|
|
||||||
$('#ajouter_ligne').onclick = plus;
|
$('#ajouter_ligne').onclick = plus;
|
||||||
|
|
||||||
a = document.querySelectorAll('[name="remove_line"]');
|
a = document.querySelectorAll('[name="remove_line"]');
|
||||||
l = a.length;
|
l = a.length;
|
||||||
for(i = 0; i < l; i++) {
|
for(i = 0; i < l; i++) {
|
||||||
a[i].onclick = function(){
|
a[i].onclick = function(){
|
||||||
this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode);
|
this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode);
|
||||||
updateSum();
|
updateSum();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,4 +99,4 @@
|
||||||
hideAllTypes();
|
hideAllTypes();
|
||||||
{/literal}
|
{/literal}
|
||||||
selectType({$radio.type});
|
selectType({$radio.type});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<?php continue; ?>
|
<?php continue; ?>
|
||||||
{/if}
|
{/if}
|
||||||
{if $key == 'siret'}
|
{if $key == 'siret'}
|
||||||
<?php
|
<?php
|
||||||
if (null === $value) { $value = ""; }
|
if (null === $value) { $value = ""; }
|
||||||
$value = implode(' ', str_split($value, 3));
|
$value = implode(' ', str_split($value, 3));
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue