diff --git a/htdocs/categories/photos.php b/htdocs/categories/photos.php
index bfb4f60a32a..d3b1f8854b9 100644
--- a/htdocs/categories/photos.php
+++ b/htdocs/categories/photos.php
@@ -29,6 +29,7 @@
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/categories.lib.php';
$langs->load("categories");
@@ -90,6 +91,7 @@ if ($action == 'addthumb' && $_GET["file"])
llxHeader("","",$langs->trans("Categories"));
$form = new Form($db);
+$formother = new FormOther($db);
if ($object->id)
{
@@ -133,50 +135,12 @@ if ($object->id)
print dol_htmlentitiesbr($object->description);
print '';
- // Visibility
- /* if ($type == 0 && ! empty($conf->global->CATEGORY_ASSIGNED_TO_A_CUSTOMER))
- {
- if ($object->socid)
- {
- $soc = new Societe($db);
- $soc->fetch($object->socid);
-
- print '
| ';
- print $langs->trans("AssignedToTheCustomer").' | ';
- print $soc->getNomUrl(1);
+ // Color
+ print ' |
| ';
+ print $langs->trans("Color").' | ';
+ print $formother->showColor($object->color);
print ' |
';
-
- $catsMeres = $object->get_meres ();
-
- if ($catsMeres < 0)
- {
- dol_print_error();
- }
- else if (count($catsMeres) > 0)
- {
- print '| ';
- print $langs->trans("CategoryContents").' | ';
- print ($object->visible ? $langs->trans("Visible") : $langs->trans("Invisible"));
- print ' |
';
- }
- }
- else
- {
- print '| ';
- print $langs->trans("CategoryContents").' | ';
- print ($object->visible ? $langs->trans("Visible") : $langs->trans("Invisible"));
- print ' |
';
- }
- }
- else
- {
- print '| ';
- print $langs->trans("CategoryContents").' | ';
- print ($object->visible ? $langs->trans("Visible") : $langs->trans("Invisible"));
- print ' |
';
- }
- */
-
+
print "\n";
print "\n";
diff --git a/htdocs/categories/traduction.php b/htdocs/categories/traduction.php
index a506726e28f..25fb000a594 100644
--- a/htdocs/categories/traduction.php
+++ b/htdocs/categories/traduction.php
@@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/categories.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
$langs->load("categories");
$langs->load("languages");
@@ -143,6 +144,7 @@ llxHeader("","",$langs->trans("Translation"));
$form = new Form($db);
$formadmin=new FormAdmin($db);
+$formother = new FormOther($db);
if ($type == Categorie::TYPE_PRODUCT) $title=$langs->trans("ProductsCategoryShort");
elseif ($type == Categorie::TYPE_SUPPLIER) $title=$langs->trans("SuppliersCategoryShort");
@@ -171,11 +173,17 @@ print '';
print '';
// Description
-print '| ';
+print ' |
| ';
print $langs->trans("Description").' | ';
print dol_htmlentitiesbr($object->description);
print ' |
';
+// Color
+print '| ';
+print $langs->trans("Color").' | ';
+print $formother->showColor($object->color);
+print ' |
';
+
print '';
if ($action == 'edit')
@@ -194,8 +202,8 @@ if ($action == 'edit')
{
print "
".$langs->trans('Language_'.$key)." :
";
print '';
- print '| '.$langs->trans('Label').' | |
';
- print '| '.$langs->trans('Description').' | ';
+ print ' |
| '.$langs->trans('Label').' | |
';
+ print '| '.$langs->trans('Description').' | ';
$doleditor = new DolEditor("desc-$key", $object->multilangs[$key]["description"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 3, 80);
$doleditor->Create();
print ' |
';
@@ -205,7 +213,7 @@ if ($action == 'edit')
}
}
- print '
';
+ print '
';
print '
';
print ' ';
print '
';
@@ -225,9 +233,9 @@ else
$s=picto_from_langcode($key);
print "
".($s?$s.' ':'')."
".$langs->trans('Language_'.$key).":";
print '
';
- print '| '.$langs->trans('Label').' | '.$object->multilangs[$key]["label"].' |
';
- print '| '.$langs->trans('Description').' | '.$object->multilangs[$key]["description"].' |
';
- print '| '.$langs->trans('Note').' | '.$object->multilangs[$key]["note"].' |
';
+ print ' |
';
+ print '| '.$langs->trans('Description').' | '.$object->multilangs[$key]["description"].' |
';
+ print '| '.$langs->trans('Note').' | '.$object->multilangs[$key]["note"].' |
';
print '
';
}
}
@@ -271,11 +279,11 @@ if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service
print '
';
print '
';
- print '| '.$langs->trans('Translation').' | ';
+ print ' |
| '.$langs->trans('Translation').' | ';
print $formadmin->select_language('','forcelangprod',0,$object->multilangs);
print ' |
';
- print '| '.$langs->trans('Label').' | |
';
- print '| '.$langs->trans('Description').' | ';
+ print ' |
| '.$langs->trans('Label').' | |
';
+ print '| '.$langs->trans('Description').' | ';
$doleditor = new DolEditor('desc', '', '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, 3, 80);
$doleditor->Create();
print ' |
';
@@ -283,7 +291,7 @@ if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service
print '';
print '
';
- print '