Skip to content
Snippets Groups Projects
Commit 057e107d authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix on skeleton

parent dcb18cd6
Branches
Tags
No related merge requests found
......@@ -59,7 +59,7 @@ $myparam = GETPOST('myparam','alpha');
$search_field1=GETPOST("search_field1");
$search_field2=GETPOST("search_field2");
if (empty($action) && empty($id) && empty($ref)) $action='list';
if (empty($action) && empty($id) && empty($ref)) $action='view';
// Protection if external user
if ($user->societe_id > 0)
......@@ -300,7 +300,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
print '<table class="border centpercent">'."\n";
// print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td><input class="flat" type="text" size="36" name="label" value="'.$label.'"></td></tr>';
// print '<tr><td class="fieldrequired">'.$langs->trans("Label").'</td><td>'.$object->label.'</td></tr>';
// LIST_OF_TD_LABEL_FIELDS_VIEW
print '</table>';
......
......@@ -365,6 +365,8 @@ class Skeleton_Class extends CommonObject
}
}
// If you need to delete child tables to, you can insert them here
if (!$error) {
$sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $this->table_element;
$sql .= ' WHERE rowid=' . $this->id;
......@@ -437,8 +439,7 @@ class Skeleton_Class extends CommonObject
}
/**
* Return a link to the user card (with optionaly the picto)
* Use this->id,this->lastname, this->firstname
* Return a link to the object card (with optionaly the picto)
*
* @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto)
* @param string $option On what the link point to
......@@ -461,7 +462,7 @@ class Skeleton_Class extends CommonObject
$label.= '<div width="100%">';
$label.= '<b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
$link = '<a href="'.DOL_URL_ROOT.'/mymodule/card.php?id='.$this->id.'"';
$link = '<a href="'.DOL_URL_ROOT.'/mymodule/'.$this->table_name.'_card.php?id='.$this->id.'"';
$link.= ($notooltip?'':' title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip'.($morecss?' '.$morecss:'').'"');
$link.= '>';
$linkend='</a>';
......@@ -487,13 +488,13 @@ class Skeleton_Class extends CommonObject
}
/**
* Renvoi le libelle d'un status donne
* Return the status
*
* @param int $status Id status
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @param int $mode 0=long label, 1=short label, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Label of status
*/
function LibStatut($status,$mode=0)
static function LibStatut($status,$mode=0)
{
global $langs;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment