From e689e9ed76cf196f42dbceb22883dbef554398f8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 5 Nov 2015 21:33:05 +0100 Subject: [PATCH] Debug generator de code --- dev/skeletons/build_class_from_table.php | 2 +- dev/skeletons/skeleton_card.php | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/dev/skeletons/build_class_from_table.php b/dev/skeletons/build_class_from_table.php index 65b6c023b89..6025f6a1f4e 100755 --- a/dev/skeletons/build_class_from_table.php +++ b/dev/skeletons/build_class_from_table.php @@ -639,7 +639,7 @@ foreach ($skeletonfiles as $skeletonfile => $outfile) { if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime']) { - $varprop.="print ''.\$langs->trans(\"Field".$prop['field']."\").'".$prop['field']."';\n"; + $varprop.="print ''.\$langs->trans(\"Field".$prop['field']."\").'\$object->".$prop['field']."';\n"; } } $targetcontent=preg_replace('/LIST_OF_TD_LABEL_FIELDS_VIEW/', $varprop, $targetcontent); diff --git a/dev/skeletons/skeleton_card.php b/dev/skeletons/skeleton_card.php index 9cf6f26440c..22958c9c833 100644 --- a/dev/skeletons/skeleton_card.php +++ b/dev/skeletons/skeleton_card.php @@ -255,8 +255,10 @@ if ($action == 'create') // Part to edit record if (($id || $ref) && $action == 'edit') { + print load_fiche_titre($langs->trans("MyModule")); + print '
'; - print ''; + print ''; print ''; print ''; @@ -265,11 +267,13 @@ if (($id || $ref) && $action == 'edit') print ''."\n"; // print ''; // LIST_OF_TD_LABEL_FIELDS_EDIT - print ''; + print '
'.$langs->trans("Label").'
'; dol_fiche_end(); - print '
'; + print '
'; + print '   '; + print '
'; print '
'; } @@ -279,12 +283,14 @@ if (($id || $ref) && $action == 'edit') // Part to show record if ($id && (empty($action) || $action == 'view')) { + print load_fiche_titre($langs->trans("MyModule")); + dol_fiche_head(); print ''."\n"; // print ''; // LIST_OF_TD_LABEL_FIELDS_VIEW - print ''; + print '
'.$langs->trans("Label").'
'; dol_fiche_end();