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