Debug v13
This commit is contained in:
parent
1f6f434a9c
commit
8a0c065163
@ -6197,6 +6197,7 @@ class Form
|
|||||||
$tmpfieldstoshow = '';
|
$tmpfieldstoshow = '';
|
||||||
foreach ($objecttmp->fields as $key => $val)
|
foreach ($objecttmp->fields as $key => $val)
|
||||||
{
|
{
|
||||||
|
if (!dol_eval($val['enabled'], 1, 1)) continue;
|
||||||
if ($val['showoncombobox']) $tmpfieldstoshow .= ($tmpfieldstoshow ? ',' : '').'t.'.$key;
|
if ($val['showoncombobox']) $tmpfieldstoshow .= ($tmpfieldstoshow ? ',' : '').'t.'.$key;
|
||||||
}
|
}
|
||||||
if ($tmpfieldstoshow) $fieldstoshow = $tmpfieldstoshow;
|
if ($tmpfieldstoshow) $fieldstoshow = $tmpfieldstoshow;
|
||||||
@ -6294,8 +6295,7 @@ class Form
|
|||||||
}
|
}
|
||||||
if (empty($outputmode))
|
if (empty($outputmode))
|
||||||
{
|
{
|
||||||
if ($preselectedvalue > 0 && $preselectedvalue == $obj->rowid)
|
if ($preselectedvalue > 0 && $preselectedvalue == $obj->rowid) {
|
||||||
{
|
|
||||||
$out .= '<option value="'.$obj->rowid.'" selected>'.$label.'</option>';
|
$out .= '<option value="'.$obj->rowid.'" selected>'.$label.'</option>';
|
||||||
} else {
|
} else {
|
||||||
$out .= '<option value="'.$obj->rowid.'">'.$label.'</option>';
|
$out .= '<option value="'.$obj->rowid.'">'.$label.'</option>';
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
* @param string $url Ajax Url to call for request: /path/page.php. Must return a json array ('key'=>id, 'value'=>String shown into input field once selected, 'label'=>String shown into combo list)
|
* @param string $url Ajax Url to call for request: /path/page.php. Must return a json array ('key'=>id, 'value'=>String shown into input field once selected, 'label'=>String shown into combo list)
|
||||||
* @param string $urloption More parameters on URL request
|
* @param string $urloption More parameters on URL request
|
||||||
* @param int $minLength Minimum number of chars to trigger that Ajax search
|
* @param int $minLength Minimum number of chars to trigger that Ajax search
|
||||||
* @param int $autoselect Automatic selection if just one value
|
* @param int $autoselect Automatic selection if just one value (trigger("change") on field is done is search return only 1 result)
|
||||||
* @param array $ajaxoptions Multiple options array
|
* @param array $ajaxoptions Multiple options array
|
||||||
* - Ex: array('update'=>array('field1','field2'...)) will reset field1 and field2 once select done
|
* - Ex: array('update'=>array('field1','field2'...)) will reset field1 and field2 once select done
|
||||||
* - Ex: array('disabled'=> )
|
* - Ex: array('disabled'=> )
|
||||||
|
|||||||
@ -413,6 +413,7 @@ class Product extends CommonObject
|
|||||||
public $fields = array(
|
public $fields = array(
|
||||||
'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'index'=>1, 'position'=>1, 'comment'=>'Id'),
|
'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'index'=>1, 'position'=>1, 'comment'=>'Id'),
|
||||||
'ref' =>array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1, 'comment'=>'Reference of object'),
|
'ref' =>array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1, 'comment'=>'Reference of object'),
|
||||||
|
'barcode' =>array('type'=>'varchar(255)', 'label'=>'Barcode', 'enabled'=>'!empty($conf->barcode->enabled)', 'visible'=>-1, 'showoncombobox'=>1),
|
||||||
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'default'=>1, 'notnull'=>1, 'index'=>1, 'position'=>20),
|
'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'default'=>1, 'notnull'=>1, 'index'=>1, 'position'=>20),
|
||||||
'label' =>array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1),
|
'label' =>array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1),
|
||||||
'note_public' =>array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>61),
|
'note_public' =>array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>61),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user