Add hidden option MAIN_INPUT_DESC_HEIGHT

This commit is contained in:
Laurent Destailleur 2010-01-09 12:13:22 +00:00
parent be1196b40b
commit d6558bbb52
5 changed files with 33 additions and 15 deletions

View File

@ -1649,7 +1649,9 @@ if ($id > 0 || ! empty($ref))
} }
else else
{ {
print '<textarea class="flat" cols="70" name="dp_desc" rows="'.ROWS_2.'">'.$_POST["dp_desc"].'</textarea>'; $nbrows=ROWS_2;
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
print '<textarea class="flat" cols="70" name="dp_desc" rows="'.$nbrows.'">'.$_POST["dp_desc"].'</textarea>';
} }
print '</td>'; print '</td>';
print '<td align="right">'; print '<td align="right">';
@ -1722,7 +1724,9 @@ if ($id > 0 || ! empty($ref))
} }
else else
{ {
print '<textarea cols="70" name="np_desc" rows="'.ROWS_2.'" class="flat">'.$_POST["np_desc"].'</textarea>'; $nbrows=ROWS_2;
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
print '<textarea cols="70" name="np_desc" rows="'.$nbrows.'" class="flat">'.$_POST["np_desc"].'</textarea>';
} }
print '</td>'; print '</td>';

View File

@ -1665,7 +1665,7 @@ else
} }
else print '&nbsp;'; else print '&nbsp;';
print '</td>'; print '</td>';
//Remise percent (negative or positive) //Remise percent (negative or positive)
if (!empty($objp->remise_percent)) if (!empty($objp->remise_percent))
{ {
@ -1675,7 +1675,7 @@ else
{ {
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
} }
// Montant total HT // Montant total HT
print '<td align="right" nowrap="nowrap">'.price($objp->total_ht).'</td>'; print '<td align="right" nowrap="nowrap">'.price($objp->total_ht).'</td>';
@ -1858,7 +1858,9 @@ else
} }
else else
{ {
print '<textarea class="flat" cols="70" name="dp_desc" rows="'.ROWS_2.'">'.$_POST["dp_desc"].'</textarea>'; $nbrows=ROWS_2;
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
print '<textarea class="flat" cols="70" name="dp_desc" rows="'.$nbrows.'">'.$_POST["dp_desc"].'</textarea>';
} }
print '</td>'; print '</td>';
print '<td align="right">'; print '<td align="right">';
@ -1936,7 +1938,9 @@ else
} }
else else
{ {
print '<textarea cols="70" name="np_desc" rows="'.ROWS_2.'" class="flat">'.$_POST["np_desc"].'</textarea>'; $nbrows=ROWS_2;
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
print '<textarea cols="70" name="np_desc" rows="'.$nbrows.'" class="flat">'.$_POST["np_desc"].'</textarea>';
} }
print '</td>'; print '</td>';

View File

@ -572,7 +572,7 @@ if ($_POST['action'] == 'add' && $user->rights->facture->creer)
$facture->type = 2; $facture->type = 2;
$facid = $facture->create($user); $facid = $facture->create($user);
// Add predefined lines // Add predefined lines
for ($i = 1; $i <= $NBLINES; $i++) for ($i = 1; $i <= $NBLINES; $i++)
{ {
@ -2879,7 +2879,7 @@ else
} }
else print '&nbsp;'; else print '&nbsp;';
print '</td>'; print '</td>';
// Remise percent (negative or positive) // Remise percent (negative or positive)
if (!empty($objp->remise_percent)) if (!empty($objp->remise_percent))
{ {
@ -2889,7 +2889,7 @@ else
{ {
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
} }
// Montant total HT // Montant total HT
print '<td align="right">'.price($objp->total_ht)."</td>\n"; print '<td align="right">'.price($objp->total_ht)."</td>\n";
@ -3076,7 +3076,9 @@ else
} }
else else
{ {
print '<textarea class="flat" cols="70" name="dp_desc" rows="'.ROWS_2.'">'.$_POST["dp_desc"].'</textarea>'; $nbrows=ROWS_2;
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
print '<textarea class="flat" cols="70" name="dp_desc" rows="'.$nbrows.'">'.$_POST["dp_desc"].'</textarea>';
} }
print '</td>'; print '</td>';
print '<td align="right">'; print '<td align="right">';
@ -3152,7 +3154,9 @@ else
} }
else else
{ {
print '<textarea cols="70" name="np_desc" rows="'.ROWS_2.'" class="flat">'.$_POST["np_desc"].'</textarea>'; $nbrows=ROWS_2;
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
print '<textarea cols="70" name="np_desc" rows="'.$nbrows.'" class="flat">'.$_POST["np_desc"].'</textarea>';
} }
print '</td>'; print '</td>';
@ -3456,7 +3460,7 @@ else
$sql.= " AND el.sourcetype = 'commande'"; $sql.= " AND el.sourcetype = 'commande'";
$sql.= " AND el.fk_target = ".$fac->id; $sql.= " AND el.fk_target = ".$fac->id;
$sql.= " AND el.targettype = '".$fac->element."'"; $sql.= " AND el.targettype = '".$fac->element."'";
$resql = $db->query($sql); $resql = $db->query($sql);
if ($resql) if ($resql)
{ {

View File

@ -879,7 +879,9 @@ if ($id > 0 || ! empty($ref))
} }
else else
{ {
print '<textarea class="flat" cols="70" name="dp_desc" rows="'.ROWS_2.'">'.$_POST["dp_desc"].'</textarea>'; $nbrows=ROWS_2;
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
print '<textarea class="flat" cols="70" name="dp_desc" rows="'.$nbrows.'">'.$_POST["dp_desc"].'</textarea>';
} }
print '</td>'; print '</td>';
print '<td align="center">'; print '<td align="center">';
@ -937,7 +939,9 @@ if ($id > 0 || ! empty($ref))
} }
else else
{ {
print '<textarea cols="70" name="np_desc" rows="'.ROWS_2.'" class="flat">'.$_POST["np_desc"].'</textarea>'; $nbrows=ROWS_2;
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
print '<textarea cols="70" name="np_desc" rows="'.$nbrows.'" class="flat">'.$_POST["np_desc"].'</textarea>';
} }
print '</td>'; print '</td>';

View File

@ -1076,7 +1076,9 @@ else
} }
else else
{ {
print '<textarea class="flat" cols="60" name="label" rows="'.ROWS_2.'">'.$_POST["label"].'</textarea>'; $nbrows=ROWS_2;
if (! empty($conf->global->MAIN_INPUT_DESC_HEIGHT)) $nbrows=$conf->global->MAIN_INPUT_DESC_HEIGHT;
print '<textarea class="flat" cols="60" name="label" rows="'.$nbrows.'">'.$_POST["label"].'</textarea>';
} }
print '</td>'; print '</td>';
print '<td align="right">'; print '<td align="right">';