diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php
index 68aa224423c..fd84cb5e4dd 100644
--- a/htdocs/modulebuilder/index.php
+++ b/htdocs/modulebuilder/index.php
@@ -2280,6 +2280,13 @@ if ($module == 'initmodule') {
}
print '';
+ print '
| ';
+ print $langs->trans("Picto");
+ print ' | ';
+ print $moduleobj->picto;
+ print ' '.img_picto('', $moduleobj->picto, 'class="valignmiddle pictomodule paddingrightonly"');
+ print ' |
';
+
print '| ';
print $langs->trans("Description");
print ' | ';
diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php
index d9898338960..d0e6acf70e3 100644
--- a/htdocs/modulebuilder/template/class/myobject.class.php
+++ b/htdocs/modulebuilder/template/class/myobject.class.php
@@ -59,9 +59,9 @@ class MyObject extends CommonObject
public $isextrafieldmanaged = 1;
/**
- * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
+ * @var string String with name of icon for myobject. Must be a 'fa-xxx' fontawesome code (or 'fa-xxx_fa_color_size') or 'myobject@mymodule' if picto is file 'img/object_myobject.png'.
*/
- public $picto = 'myobject@mymodule';
+ public $picto = 'fa-file';
const STATUS_DRAFT = 0;
diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php
index 14fd3a52171..c71d7abc4be 100644
--- a/htdocs/modulebuilder/template/myobject_list.php
+++ b/htdocs/modulebuilder/template/myobject_list.php
@@ -97,7 +97,7 @@ $show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk
$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
-$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search
+$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', __FILE__); // To manage different context of search
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
$mode = GETPOST('mode', 'aZ');
|