Fix modulebuilder
This commit is contained in:
parent
cc813df2a5
commit
e270295f5c
@ -19,6 +19,8 @@
|
|||||||
* $action
|
* $action
|
||||||
* $conf
|
* $conf
|
||||||
* $langs
|
* $langs
|
||||||
|
*
|
||||||
|
* $keyforbreak may be defined to key to switch on second column
|
||||||
*/
|
*/
|
||||||
?>
|
?>
|
||||||
<!-- BEGIN PHP TEMPLATE commonfields_view.tpl.php -->
|
<!-- BEGIN PHP TEMPLATE commonfields_view.tpl.php -->
|
||||||
@ -37,6 +39,7 @@ foreach($object->fields as $key => $val)
|
|||||||
print '<tr><td';
|
print '<tr><td';
|
||||||
print ' class="titlefield';
|
print ' class="titlefield';
|
||||||
if ($val['notnull'] > 0) print ' fieldrequired';
|
if ($val['notnull'] > 0) print ' fieldrequired';
|
||||||
|
if ($val['type'] == 'text' || $val['type'] == 'html') print ' tdtop';
|
||||||
print '"';
|
print '"';
|
||||||
print '>'.$langs->trans($val['label']).'</td>';
|
print '>'.$langs->trans($val['label']).'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
@ -45,7 +48,7 @@ foreach($object->fields as $key => $val)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
//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 '</table>';
|
print '</table>';
|
||||||
@ -60,7 +63,7 @@ foreach($object->fields as $key => $val)
|
|||||||
{
|
{
|
||||||
if ($alreadyoutput)
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,6 +76,7 @@ foreach($object->fields as $key => $val)
|
|||||||
print '<tr><td';
|
print '<tr><td';
|
||||||
print ' class="titlefield';
|
print ' class="titlefield';
|
||||||
if ($val['notnull'] > 0) print ' fieldrequired';
|
if ($val['notnull'] > 0) print ' fieldrequired';
|
||||||
|
if ($val['type'] == 'text' || $val['type'] == 'html') print ' tdtop';
|
||||||
print '"';
|
print '"';
|
||||||
print '>'.$langs->trans($val['label']).'</td>';
|
print '>'.$langs->trans($val['label']).'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
|
|||||||
@ -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_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),
|
//'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),
|
'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;
|
public $rowid;
|
||||||
|
|||||||
@ -322,6 +322,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
print '<table class="border centpercent">'."\n";
|
print '<table class="border centpercent">'."\n";
|
||||||
|
|
||||||
// Common attributes
|
// Common attributes
|
||||||
|
//$keyforbreak='fieldkeytoswithonsecondcolumn';
|
||||||
include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php';
|
include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php';
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
@ -329,16 +330,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
/* Second column
|
|
||||||
print '<div class="fichehalfright">';
|
|
||||||
print '<div class="ficheaddleft">';
|
|
||||||
print '<div class="underbanner clearboth"></div>';
|
|
||||||
print '<table class="border centpercent">';
|
|
||||||
|
|
||||||
print '</table>';
|
|
||||||
print '</div>';*/
|
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user