23include_once DOL_DOCUMENT_ROOT.
'/societe/canvas/actions_card_common.class.php';
42 public function __construct($db, $dirmodule, $targetmodule, $canvas, $card)
45 $this->dirmodule = $dirmodule;
46 $this->targetmodule = $targetmodule;
47 $this->canvas = $canvas;
64 if ($action ==
'view') {
65 $out .= $langs->trans(
"Individual");
67 if ($action ==
'edit') {
68 $out .= $langs->trans(
"EditCompany");
70 if ($action ==
'create') {
71 $out .= $langs->trans(
"NewCompany");
90 global $form, $formcompany;
94 parent::assign_values($action);
98 if ($action ==
'create' || $action ==
'edit') {
99 $this->tpl[
'select_civility'] = $formcompany->select_civility(
GETPOST(
'civility_id'));
102 if ($action ==
'delete' ||
$conf->use_javascript_ajax) {
103 $this->tpl[
'action_delete'] = $form->formconfirm($_SERVER[
"PHP_SELF"].
"?socid=".$this->object->id, $langs->trans(
"DeleteAnIndividual"), $langs->trans(
"ConfirmDeleteIndividual"),
"confirm_delete",
'', 0,
"1,action-delete");
121 public function restrictedArea($user, $features =
'societe', $objectid = 0, $dbtablename =
'', $feature2 =
'', $dbt_keyfield =
'fk_soc', $dbt_select =
'rowid')
123 return restrictedArea($user, $features, $objectid, $dbtablename, $feature2, $dbt_keyfield, $dbt_select);
Abstract class to manage third parties.
getObject($id, $ref='')
Get object from id or ref and save it into this->object.
restrictedArea($user, $features='societe', $objectid=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid')
Check permissions of a user to show a page and an object.
assign_values(&$action, $id=0, $ref='')
Assign custom values for canvas (for example into this->tpl to be used by templates)
__construct($db, $dirmodule, $targetmodule, $canvas, $card)
Constructor.
getTitle($action)
Return the title of card.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...