Responsive
This commit is contained in:
parent
81813225aa
commit
b4218f4c53
@ -1420,13 +1420,13 @@ if ($resql) {
|
||||
// Payment mode
|
||||
if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) {
|
||||
print '<td class="liste_titre">';
|
||||
print $form->select_types_paiements($search_paymentmode, 'search_paymentmode', '', 0, 1, 1, 10, 1, '', 1);
|
||||
print $form->select_types_paiements($search_paymentmode, 'search_paymentmode', '', 0, 1, 1, 0, 1, 'minwidth100 maxwidth100', 1);
|
||||
print '</td>';
|
||||
}
|
||||
// Payment terms
|
||||
if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) {
|
||||
print '<td class="liste_titre">';
|
||||
print $form->getSelectConditionsPaiements($search_paymentterms, 'search_paymentterms', -1, 1, 1);
|
||||
print $form->getSelectConditionsPaiements($search_paymentterms, 'search_paymentterms', -1, 1, 1, 'minwidth100 maxwidth100');
|
||||
print '</td>';
|
||||
}
|
||||
// Module source
|
||||
@ -2129,8 +2129,9 @@ if ($resql) {
|
||||
|
||||
// Payment mode
|
||||
if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) {
|
||||
print '<td class="tdoverflowmax100">';
|
||||
$form->form_modes_reglement($_SERVER['PHP_SELF'], $obj->fk_mode_reglement, 'none', '', -1);
|
||||
$s = $form->form_modes_reglement($_SERVER['PHP_SELF'], $obj->fk_mode_reglement, 'none', '', -1, 0, '', 1);
|
||||
print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($s).'">';
|
||||
print $s;
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
@ -2139,8 +2140,9 @@ if ($resql) {
|
||||
|
||||
// Payment terms
|
||||
if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) {
|
||||
print '<td>';
|
||||
$form->form_conditions_reglement($_SERVER['PHP_SELF'], $obj->fk_cond_reglement, 'none');
|
||||
$s = $form->form_conditions_reglement($_SERVER['PHP_SELF'], $obj->fk_cond_reglement, 'none', 0, '', -1, -1, 1);
|
||||
print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($s).'">';
|
||||
print $s;
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
|
||||
@ -5439,22 +5439,26 @@ class Form
|
||||
* @param string $deposit_percent < 0 : deposit_percent input makes no sense (for example, in list filters)
|
||||
* 0 : use default deposit percentage from entry
|
||||
* > 0 : force deposit percentage (for example, from company object)
|
||||
* @param int $nooutput No print is done. String is returned.
|
||||
* @return void
|
||||
*/
|
||||
public function form_conditions_reglement($page, $selected = '', $htmlname = 'cond_reglement_id', $addempty = 0, $type = '', $filtertype = -1, $deposit_percent = -1)
|
||||
public function form_conditions_reglement($page, $selected = '', $htmlname = 'cond_reglement_id', $addempty = 0, $type = '', $filtertype = -1, $deposit_percent = -1, $nooutput = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
|
||||
$out = '';
|
||||
|
||||
if ($htmlname != "none") {
|
||||
print '<form method="POST" action="'.$page.'">';
|
||||
print '<input type="hidden" name="action" value="setconditions">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
$out .= '<form method="POST" action="'.$page.'">';
|
||||
$out .= '<input type="hidden" name="action" value="setconditions">';
|
||||
$out .= '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
if ($type) {
|
||||
print '<input type="hidden" name="type" value="'.dol_escape_htmltag($type).'">';
|
||||
$out .= '<input type="hidden" name="type" value="'.dol_escape_htmltag($type).'">';
|
||||
}
|
||||
print $this->getSelectConditionsPaiements($selected, $htmlname, $filtertype, $addempty, 0, '', $deposit_percent);
|
||||
print '<input type="submit" class="button valignmiddle smallpaddingimp" value="'.$langs->trans("Modify").'">';
|
||||
print '</form>';
|
||||
$out .= $this->getSelectConditionsPaiements($selected, $htmlname, $filtertype, $addempty, 0, '', $deposit_percent);
|
||||
$out .= '<input type="submit" class="button valignmiddle smallpaddingimp" value="'.$langs->trans("Modify").'">';
|
||||
$out .= '</form>';
|
||||
} else {
|
||||
if ($selected) {
|
||||
$this->load_cache_conditions_paiements();
|
||||
@ -5465,15 +5469,21 @@ class Form
|
||||
$label = str_replace('__DEPOSIT_PERCENT__', $deposit_percent > 0 ? $deposit_percent : $this->cache_conditions_paiements[$selected]['deposit_percent'], $label);
|
||||
}
|
||||
|
||||
print $label;
|
||||
$out .= $label;
|
||||
} else {
|
||||
$langs->load('errors');
|
||||
print $langs->trans('ErrorNotInDictionaryPaymentConditions');
|
||||
$out .= $langs->trans('ErrorNotInDictionaryPaymentConditions');
|
||||
}
|
||||
} else {
|
||||
print " ";
|
||||
$out .= ' ';
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($nooutput)) {
|
||||
print $out;
|
||||
return '';
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
|
||||
Loading…
Reference in New Issue
Block a user