and | according to correct number of columns received into $params['colspan']
*
* @param Extrafields $extrafields Extrafield Object
* @param string $mode Show output (view) or input (edit) for extrafield
diff --git a/htdocs/core/class/emailsenderprofile.class.php b/htdocs/core/class/emailsenderprofile.class.php
index b65d72332e0..41a0d485ce0 100644
--- a/htdocs/core/class/emailsenderprofile.class.php
+++ b/htdocs/core/class/emailsenderprofile.class.php
@@ -56,19 +56,28 @@ class EmailSenderProfile extends CommonObject
public $picto = 'emailsenderprofile@monmodule';
+ const STATUS_DISABLED = 0;
+ const STATUS_ENABLED = 1;
+
+
/**
- * 'type' if the field format.
- * 'label' the translation key.
- * 'enabled' is a condition when the filed must be managed.
- * 'visible' says if field is visible in list (-1 means not shown by default but can be added into list to be viewed).
- * 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0).
- * 'index' if we want an index in database.
- * 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...).
- * 'position' is the sort order of field.
- * 'searchall' is 1 if we want to search in this field when making a search from the quick search button.
- * 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8).
- * 'help' is a string visible as a tooltip on field
- * 'comment' is not used. You can store here any text of your choice.
+ * 'type' if the field format ('integer', 'integer:Class:pathtoclass', 'varchar(x)', 'double(24,8)', 'text', 'html', 'datetime', 'timestamp', 'float')
+ * 'label' the translation key.
+ * 'enabled' is a condition when the field must be managed.
+ * 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). Using a negative value means field is not shown by default on list but can be selected for viewing)
+ * 'noteditable' says if field is not editable (1 or 0)
+ * 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0).
+ * 'default' is a default value for creation (can still be replaced by the global setup of default values)
+ * 'index' if we want an index in database.
+ * 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...).
+ * 'position' is the sort order of field.
+ * 'searchall' is 1 if we want to search in this field when making a search from the quick search button.
+ * 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8).
+ * 'css' is the CSS style to use on field. For example: 'maxwidth200'
+ * 'help' is a string visible as a tooltip on field
+ * 'comment' is not used. You can store here any text of your choice. It is not used by application.
+ * 'showoncombobox' if value of the field must be visible into the label of the combobox that list record
+ * 'arraykeyval' to set list of value if type is a list of predefined values. For example: array("0"=>"Draft","1"=>"Active","-1"=>"Cancel")
*/
// BEGIN MODULEBUILDER PROPERTIES
@@ -78,7 +87,7 @@ class EmailSenderProfile extends CommonObject
public $fields=array(
'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'visible'=>-1, 'enabled'=>1, 'position'=>1, 'notnull'=>1, 'index'=>1, 'comment'=>'Id',),
'entity' => array('type'=>'integer', 'label'=>'Entity', 'visible'=>-1, 'enabled'=>1, 'position'=>20, 'notnull'=>1, 'index'=>1,),
- 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>-1),
+ 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>1),
'email' => array('type'=>'varchar(255)', 'label'=>'Email', 'visible'=>1, 'enabled'=>1, 'position'=>40, 'notnull'=>-1),
//'fk_user_creat' => array('type'=>'integer', 'label'=>'UserAuthor', 'visible'=>-1, 'enabled'=>1, 'position'=>500, 'notnull'=>1,),
//'fk_user_modif' => array('type'=>'integer', 'label'=>'UserModif', 'visible'=>-1, 'enabled'=>1, 'position'=>500, 'notnull'=>-1,),
@@ -86,7 +95,7 @@ class EmailSenderProfile extends CommonObject
'position' => array('type'=>'integer', 'label'=>'Position', 'visible'=>1, 'enabled'=>1, 'position'=>405, 'notnull'=>-1, 'index'=>1,),
'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'visible'=>-1, 'enabled'=>1, 'position'=>500, 'notnull'=>1,),
'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'visible'=>-1, 'enabled'=>1, 'position'=>500, 'notnull'=>1,),
- 'active' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'position'=>1000, 'notnull'=>-1, 'index'=>1),
+ 'active' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'default'=>1, 'position'=>1000, 'notnull'=>-1, 'index'=>1),
);
/**
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index cac859c53b5..d70993be51d 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -6521,6 +6521,7 @@ class Form
elseif ($addjscombo == 2)
{
// Add other js lib
+ // TODO external lib multiselect/jquery.multi-select.js must have been loaded to use this multiselect plugin
// ...
$out .= '$(document).ready(function () {
$(\'#'.$htmlname.'\').multiSelect({
diff --git a/htdocs/core/modules/modExpedition.class.php b/htdocs/core/modules/modExpedition.class.php
index 68f4a3d5fba..d8225a1b2a5 100644
--- a/htdocs/core/modules/modExpedition.class.php
+++ b/htdocs/core/modules/modExpedition.class.php
@@ -133,7 +133,9 @@ class modExpedition extends DolibarrModules
$r++;
// Boxes
- $this->boxes = array();
+ $this->boxes = array(
+ 0=>array('file'=>'box_shipments.php','enabledbydefaulton'=>'Home'),
+ );
// Permissions
$this->rights = array();
diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php
index 55b6907f912..e71d44cd573 100644
--- a/htdocs/emailcollector/class/emailcollector.class.php
+++ b/htdocs/emailcollector/class/emailcollector.class.php
@@ -667,6 +667,7 @@ class EmailCollector extends CommonObject
/**
* Return the connectstring to use with IMAP connection function
*
+ * @param int $ssl Add /ssl tag
* @param int $norsh Add /norsh to connectstring
* @return string
*/
@@ -693,21 +694,20 @@ class EmailCollector extends CommonObject
* @param string $str String to encode
* @return string Encode string
*/
- function getEncodedUtf7($str) {
+ public function getEncodedUtf7($str)
+ {
if (function_exists('mb_convert_encoding')) {
- # change spaces by entropy because mb_convert fail with spaces
+ // change spaces by entropy because mb_convert fail with spaces
$str=preg_replace("/ /", "xyxy", $str);
- # if mb_convert work
+ // if mb_convert work
if ($str = mb_convert_encoding($str, "UTF-7")) {
- # change characters
+ // change characters
$str=preg_replace("/\+A/", "&A", $str);
- # change to spaces again
+ // change to spaces again
$str=preg_replace("/xyxy/", " ", $str);
- # return encoded string
return $str;
- # else
} else {
- # print error and return false
+ // print error and return false
$this->error = "error: is not possible to encode this string '".$str."'";
return false;
}
diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php
index 3f7abd4b4e5..ca543f5f2d5 100644
--- a/htdocs/expedition/card.php
+++ b/htdocs/expedition/card.php
@@ -2459,10 +2459,10 @@ elseif ($id || $ref)
if (!empty($conf->productbatch->enabled)) $colspan++;
if (!empty($conf->stock->enabled)) $colspan++;
- $lines[$i]->fetch_optionals($lines[$i]->id);
+ $line = $lines[$i];
+ $line->fetch_optionals($line->id);
- print ' |