diff --git a/ChangeLog b/ChangeLog index 218d68c4ed8..71eaf9fa326 100644 --- a/ChangeLog +++ b/ChangeLog @@ -30,6 +30,7 @@ The following changes may create regressions for some external modules, but were * The directory theme/common/octicons has been removed * The library timepicker.js has been removed. Was not used by Dolibarr. * Because of new TRIGGER_PREFIX property triggers SUPPLIER_PRODUCT_BUYPRICE_XXX are renamed to PRODUCT_BUYPRICE_XXX. +* Function img_pdf() has been removed. Replace it with img_picto('', 'pdf.png') if you were using it. ***** ChangeLog for 22.0.2 compared to 22.0.1 ***** diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php index 7ad6a501c4f..6ade34e3900 100644 --- a/htdocs/comm/action/rapport/index.php +++ b/htdocs/comm/action/rapport/index.php @@ -171,7 +171,9 @@ if ($resql) { // Button to build doc print ''; - print ''.img_picto($langs->trans('BuildDoc'), 'filenew').''; + print ''; + print img_picto($langs->trans('BuildDoc'), 'filenew.png'); + print ''; print ''; $name = "actions-".$obj->month."-".$obj->year.".pdf"; @@ -185,7 +187,6 @@ if ($resql) { if (file_exists($file)) { print ''; - //print ''.img_pdf().''; $filearray = array('name' => basename($file), 'fullname' => $file, 'type' => 'file'); $out = ''; diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 15408298313..6976e7977fa 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -990,7 +990,7 @@ if ($result >= 0) { } print '
'; - print ''; + print ''; /*if (isModEnabled('prelevement')) { $langs->load("withdrawals"); if (getDolGlobalString('WITHDRAW_DISABLE_AUTOCREATE_ONPAYMENTS')) { diff --git a/htdocs/compta/paiement/rapport.php b/htdocs/compta/paiement/rapport.php index cc42e4a97ab..6676b6d562a 100644 --- a/htdocs/compta/paiement/rapport.php +++ b/htdocs/compta/paiement/rapport.php @@ -163,7 +163,7 @@ if ($year) { foreach ($files as $f) { $relativepath = $f['level1name'].'/'.$f['name']; print ''; - print ''.img_pdf().' '.$f['name'].''.$formfile->showPreview($f['name'], 'facture_paiement', $relativepath, 0).''; + print ''.img_picto('', 'pdf').' '.$f['name'].''.$formfile->showPreview($f['name'], 'facture_paiement', $relativepath, 0).''; print ''.dol_print_size($f['size']).''; print ''.dol_print_date($f['date'], "dayhour").''; print ''.img_delete().''; diff --git a/htdocs/compta/paiement_vat.php b/htdocs/compta/paiement_vat.php index 9c4575c6373..9efec46fa16 100644 --- a/htdocs/compta/paiement_vat.php +++ b/htdocs/compta/paiement_vat.php @@ -323,7 +323,7 @@ if ($action == 'create') { print '
'; // Bouton Save payment - print '
'; + print '
'; print '
'; print '     '; print ''; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index c5fdf5c4e89..1e275b08f14 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -216,7 +216,9 @@ class Form $ret .= ''; } if ($htmlname && GETPOST('action', 'aZ09') != 'edit' . $htmlname && $perm) { - $ret .= '' . img_edit($langs->trans('Edit'), ($notabletag ? 0 : 1)) . ''; + $ret .= ''; + $ret .= img_edit($langs->trans('Edit'), ($notabletag ? 0 : 1)); + $ret .= ''; } if (!empty($notabletag) && $notabletag == 1) { if ($text) { diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 44d41b5e8e4..89276ac76ee 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -6144,25 +6144,7 @@ function img_action($titlealt, $numaction, $picto = '', $moreatt = '') } /** - * Show pdf logo - * - * @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. - * @param int $size Taille de l'icone : 3 = 16x16px , 2 = 14x14px - * @return string Retourne tag img - */ -function img_pdf($titlealt = 'default', $size = 3) -{ - global $langs; - - if ($titlealt == 'default') { - $titlealt = $langs->trans('Show'); - } - - return img_picto($titlealt, 'pdf' . $size . '.png'); -} - -/** - * Show logo + + * Show logo "+" * * @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. * @param string $other Add more attributes on img @@ -6179,7 +6161,7 @@ function img_edit_add($titlealt = 'default', $other = '') return img_picto($titlealt, 'edit_add.png', $other); } /** - * Show logo - + * Show logo "-" * * @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. * @param string $other Add more attributes on img @@ -6212,7 +6194,7 @@ function img_edit($titlealt = 'default', $float = 0, $other = '') $titlealt = $langs->trans('Modify'); } - return img_picto($titlealt, 'edit.png', ($float ? 'style="float: ' . ($langs->tab_translate["DIRECTION"] == 'rtl' ? 'left' : 'right') . '"' : "") . ($other ? ' ' . $other : '')); + return img_picto($titlealt, 'edit_add.png', ($float ? 'style="float: ' . ($langs->tab_translate["DIRECTION"] == 'rtl' ? 'left' : 'right') . '"' : "") . ($other ? ' ' . $other : '')); } /** diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 1ada631fd35..3e7606ca4ed 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -917,7 +917,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie // Save + Cancel Buttons if ($action != 'add_paiement') { print '
'; - print '
'; + print '
'; print ''; print '   '; print '
'; diff --git a/htdocs/fourn/facture/rapport.php b/htdocs/fourn/facture/rapport.php index f998545d85a..084b3e03983 100644 --- a/htdocs/fourn/facture/rapport.php +++ b/htdocs/fourn/facture/rapport.php @@ -181,7 +181,7 @@ if ($year) { if (preg_match('/^supplier_payment/i', $file)) { $tfile = $dir.'/'.$year.'/'.$file; $relativepath = $year.'/'.$file; - print ''.img_pdf().' '.$file.''.$formfile->showPreview($file, 'facture_fournisseur', 'payments/'.$relativepath, 0).''; + print ''.img_picto('', 'pdf').' '.$file.''.$formfile->showPreview($file, 'facture_fournisseur', 'payments/'.$relativepath, 0).''; print ''.dol_print_size(dol_filesize($tfile)).''; print ''.dol_print_date(dol_filemtime($tfile), "dayhour").''; print ''.img_delete().''; diff --git a/htdocs/salaries/card.php b/htdocs/salaries/card.php index 06311975115..d74574040a9 100644 --- a/htdocs/salaries/card.php +++ b/htdocs/salaries/card.php @@ -676,13 +676,6 @@ if ($action == 'create' && $permissiontoadd) { print ''."\n"; } - // Bouton Save payment - /* - print ''; - print $langs->trans("ClosePaidSalaryAutomatically"); - print ''; - */ - // Other attributes $parameters = array(); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook @@ -698,7 +691,7 @@ if ($action == 'create' && $permissiontoadd) { print '
'; print '
'; - print ''.$langs->trans("ClosePaidSalaryAutomatically"); + print ''; print '
'; print '
'; @@ -895,7 +888,7 @@ if ($id > 0) { $morehtmlref .= ''; $morehtmlref .= ''; $morehtmlref .= ''; - $morehtmlref .= ''; + $morehtmlref .= ''; $morehtmlref .= ''; } @@ -905,10 +898,10 @@ if ($id > 0) { $userstatic = new User($db); $result = $userstatic->fetch($object->fk_user); if ($result > 0) { - $morehtmlref .= '
' .$langs->trans('Employee').' : '.$userstatic->getNomUrl(-1); + $morehtmlref .= '
'.$userstatic->getNomUrl(-1); } } else { - $morehtmlref .= '
' . $form->editfieldkey("Employee", 'fk_user', $object->label, $object, $permissiontoadd, 'string', '', 0, 1); + $morehtmlref .= '
' . $form->editfieldkey("", 'fk_user', $object->label, $object, $permissiontoadd, 'string', '', 0, 1); if (!empty($object->fk_user)) { $userstatic = new User($db); @@ -922,12 +915,12 @@ if ($id > 0) { } } } else { - $morehtmlref .= '
'.$langs->trans('Employee').' : '; + $morehtmlref .= '
'; $morehtmlref .= '
'; $morehtmlref .= ''; $morehtmlref .= ''; $morehtmlref .= $form->select_dolusers($object->fk_user, 'userid', 1); - $morehtmlref .= ''; + $morehtmlref .= ''; $morehtmlref .= '
'; } diff --git a/htdocs/salaries/paiement_salary.php b/htdocs/salaries/paiement_salary.php index 969e6f224e8..5ccc3426ed2 100644 --- a/htdocs/salaries/paiement_salary.php +++ b/htdocs/salaries/paiement_salary.php @@ -189,7 +189,6 @@ if ($action == 'create') { } print load_fiche_titre($langs->trans("DoPayment")); - print "
\n"; print '
'; print ''; @@ -202,9 +201,9 @@ if ($action == 'create') { print ''; print ''; + print '\n"; print '\n"; print '\n"; - print '\n"; /*print '\n"; print '';*/ @@ -247,7 +246,7 @@ if ($action == 'create') { print ''; print ''; - print ''; print ''; @@ -256,9 +255,11 @@ if ($action == 'create') { print dol_get_fiche_end(); - /* - * Autres charges impayees - */ + + print '
'; + + + // List of salaries unpaid $num = 1; $i = 0; @@ -331,7 +332,7 @@ if ($action == 'create') { // Bouton Save payment print '
'; - print '
'; + print '
'; print $form->buttonsSaveCancel("ToMakePayment", "Cancel", array(), true); print '
';
'.$langs->trans("Ref").''.$id.'
'.$langs->trans("Label").''.$salary->label."
'.$langs->trans("DateStart")."".dol_print_date($salary->datesp, 'day')."
'.$langs->trans("DateEnd")."".dol_print_date($salary->dateep, 'day')."
'.$langs->trans("Label").''.$salary->label."
'.$langs->trans("DateDue")."".dol_print_date($salary->date_ech,'day')."
'.$langs->trans("Amount")."".price($salary->amount,0,$outputlangs,1,-1,-1,$conf->currency).'
'.$langs->trans("Comments").'