From 86af166792cb0c1a23ce82dcdbf1677bbfc451c6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 13 Oct 2022 18:08:42 +0200 Subject: [PATCH] css --- htdocs/core/class/html.form.class.php | 30 ++++++++++++++++++--------- htdocs/fourn/facture/card.php | 2 +- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 1479717b411..9c3e6794f4b 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5612,30 +5612,40 @@ class Form * @param int $active Active or not, -1 = all * @param int $addempty 1=Add empty entry * @param string $type Type ('direct-debit' or 'bank-transfer') + * @param int $nooutput 1=Return string, no output * @return void */ - public function form_modes_reglement($page, $selected = '', $htmlname = 'mode_reglement_id', $filtertype = '', $active = 1, $addempty = 0, $type = '') + public function form_modes_reglement($page, $selected = '', $htmlname = 'mode_reglement_id', $filtertype = '', $active = 1, $addempty = 0, $type = '', $nooutput = 0) { // phpcs:enable global $langs; + + $out = ''; if ($htmlname != "none") { - print '
'; - print ''; - print ''; + $out .= ''; + $out .= ''; + $out .= ''; if ($type) { - print ''; + $out .= ''; } - print $this->select_types_paiements($selected, $htmlname, $filtertype, 0, $addempty, 0, 0, $active, '', 1); - print ''; - print '
'; + $out .= $this->select_types_paiements($selected, $htmlname, $filtertype, 0, $addempty, 0, 0, $active, '', 1); + $out .= ''; + $out .= ''; } else { if ($selected) { $this->load_cache_types_paiements(); - print $this->cache_types_paiements[$selected]['label']; + $out .= $this->cache_types_paiements[$selected]['label']; } else { - print " "; + $out .= " "; } } + + if ($nooutput) { + return $out; + } else { + print $out; + } + } /** diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index f00406d63fd..7b318930b54 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -3330,7 +3330,7 @@ if ($action == 'create') { print $paymentstatic->getNomUrl(1); print ''; print ''.dol_print_date($db->jdate($objp->dp), 'day').''; - $s = $form->form_modes_reglement(null, $objp->paiement_type, 'none').' '.$objp->num_payment; + $s = $form->form_modes_reglement(null, $objp->paiement_type, 'none', '', 1, 0, '', 1).' '.$objp->num_payment; print ''; print $s; print '';