diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 2a9e52454df..f3542260589 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1750,7 +1750,7 @@ class Categorie extends CommonObject * @param int $notooltip 1=Disable tooltip * @param string $morecss Add more css on link * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking - * @return string Chaine avec URL + * @return string String with URL */ public function getNomUrl($withpicto = 0, $option = '', $maxlength = 0, $moreparam = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = 0) { @@ -1806,7 +1806,7 @@ class Categorie extends CommonObject $linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"'); $linkclose .= $dataparams.' class="'.$classfortooltip.' '.$forced_color.($morecss ? ' '.$morecss : '').'"'; } else { - $linkclose = ($morecss ? ' class="'.$forced_color.($morecss ? ' '.$morecss : '').'"' : ''); + $linkclose = ' class="'.$forced_color.($morecss ? ' '.$morecss : '').'"'; } if ($option == 'nolink' || empty($url)) { diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php index 88d0ef2c0bd..6c46883797f 100644 --- a/htdocs/categories/edit.php +++ b/htdocs/categories/edit.php @@ -223,7 +223,8 @@ print ''; print dol_get_fiche_end(); -print '
 
'; +print $form->buttonsSaveCancel("Save", "Cancel"); + print ''; diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index b2b8ea29d72..061d4bc8787 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -286,10 +286,7 @@ $morehtmlref .= ''; dol_banner_tab($object, 'label', $linkback, ($user->socid ? 0 : 1), 'label', 'label', $morehtmlref, '&type='.urlencode($type), 0, '', '', 1); -/* - * Confirmation suppression - */ - +// Confirmation of deletion if ($action == 'delete') { if ($backtopage) { print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type.'&backtopage='.urlencode($backtopage), $langs->trans('DeleteCategory'), $langs->trans('ConfirmDeleteCategory'), 'confirm_delete', '', '', 2); @@ -430,7 +427,7 @@ if ($cats < 0) { $categstatic->ref = $val['label']; $categstatic->color = $val['color']; $categstatic->type = $type; - $desc = dol_htmlcleanlastbr($val['description']); + //$desc = dol_htmlcleanlastbr($val['description']); $counter = ''; if (getDolGlobalString('CATEGORY_SHOW_COUNTS')) { @@ -440,14 +437,18 @@ if ($cats < 0) { $counter = "".(is_array($elements) ? count($elements) : '0').""; } - $color = $categstatic->color ? ' style="background: #'.sprintf("%06s", $categstatic->color).';"' : ' style="background: #bbb"'; - $li = $categstatic->getNomUrl(1, '', 60, '&backtolist='.urlencode($_SERVER["PHP_SELF"].'?id='.$id.'&type='.$type)); + if ($categstatic->color) { + $stylecolor = ' style="background: #'.sprintf("%06s", $categstatic->color).';"'; + } else { + $stylecolor = ' style="background: #bbb;"'; + } + $li = $categstatic->getNomUrl(1, '', 60, '&backtolist='.urlencode($_SERVER["PHP_SELF"].'?id='.((int) $id).'&type='.urlencode($type)), 0); $entry = ''; $entry .= ''; $entry .= ''; $entry .= $counter; @@ -659,14 +660,14 @@ if ($type == Categorie::TYPE_CUSTOMER) { } print "\t".''."\n"; - print '\n"; // Link to delete from category print '
'; - $entry .= ''.$li.''; + $entry .= ''.$li.''; $entry .= '
'; + print ''; print $soc->getNomUrl(1); print "'; if ($permission) { print "id."'>"; - print $langs->trans("DeleteFromCat"); + print ''.$langs->trans("DeleteFromCat").''; print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', 0, 0, 0, '', 'paddingleft'); print ""; }