diff --git a/htdocs/core/tpl/commonfields_view.tpl.php b/htdocs/core/tpl/commonfields_view.tpl.php index ded3247f1dd..cd8c567c418 100644 --- a/htdocs/core/tpl/commonfields_view.tpl.php +++ b/htdocs/core/tpl/commonfields_view.tpl.php @@ -19,6 +19,8 @@ * $action * $conf * $langs + * + * $keyforbreak may be defined to key to switch on second column */ ?> @@ -37,6 +39,7 @@ foreach($object->fields as $key => $val) print ''.$langs->trans($val['label']).''; print ''; @@ -45,7 +48,7 @@ foreach($object->fields as $key => $val) print ''; print ''; - //if ($key == 'targetsrcfile3') break; // key used for break on second column + if (! empty($keyforbreak) && $key == $keyforbreak) break; // key used for break on second column } print ''; @@ -60,7 +63,7 @@ foreach($object->fields as $key => $val) { if ($alreadyoutput) { - //if ($key == 'targetsrcfile3') $alreadyoutput = 0; // key used for break on second column + if (! empty($keyforbreak) && $key == $keyforbreak) $alreadyoutput = 0; // key used for break on second column continue; } @@ -73,6 +76,7 @@ foreach($object->fields as $key => $val) print ''.$langs->trans($val['label']).''; print ''; diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index c5ae70a24f3..616b7ec495d 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -88,7 +88,7 @@ class MyObject extends CommonObject 'fk_user_modif' =>array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>511), //'fk_user_valid' =>array('type'=>'integer', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>512), 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'index'=>0, 'position'=>1000), - 'status' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>-1, 'index'=>1, 'position'=>1000, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Active', -1=>'Cancel')), + 'status' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'default'=>0, 'index'=>1, 'position'=>1000, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Active', -1=>'Cancel')), ); public $rowid; diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index 88cb0efed30..94123008244 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -322,6 +322,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''."\n"; // Common attributes + //$keyforbreak='fieldkeytoswithonsecondcolumn'; include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php'; // Other attributes @@ -329,16 +330,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '
'; print ''; - - /* Second column - print '
'; - print '
'; - print '
'; - print ''; - - print '
'; - print '
';*/ - print '
'; print ''; @@ -439,13 +430,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea //Select mail models is same action as presend /* if (GETPOST('modelselected')) $action = 'presend'; - + // Presend form $modelmail='inventory'; $defaulttopic='InformationMessage'; $diroutput = $conf->product->dir_output.'/inventory'; $trackid = 'stockinv'.$object->id; - + include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; */ }