Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
5a264790
Commit
5a264790
authored
9 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Plain Diff
Merge pull request #4530 from defrance/patch-96
Add hook on contacttpl
parents
47e2e33f
87c58543
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/core/tpl/contacts.tpl.php
+26
-10
26 additions, 10 deletions
htdocs/core/tpl/contacts.tpl.php
with
26 additions
and
10 deletions
htdocs/core/tpl/contacts.tpl.php
+
26
−
10
View file @
5a264790
<?php
/* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015
Charlie BENKE <charlie@patas-monkey.com>
/* Copyright (C) 2012 Regis Houssin
<regis.houssin@capnetworks.com>
* Copyright (C) 2013-2015 Laurent Destailleur
<eldy@users.sourceforge.net>
* Copyright (C) 2015
-2016
Charlie BENKE <charlie@patas-monkey.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -27,15 +27,22 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
$module
=
$object
->
element
;
// Special cases
if
(
$module
==
'propal'
)
{
$permission
=
$user
->
rights
->
propale
->
creer
;
}
elseif
(
$module
==
'fichinter'
)
{
$permission
=
$user
->
rights
->
ficheinter
->
creer
;
}
if
(
$module
==
'propal'
)
{
$permission
=
$user
->
rights
->
propale
->
creer
;
}
elseif
(
$module
==
'fichinter'
)
{
$permission
=
$user
->
rights
->
ficheinter
->
creer
;
}
elseif
(
$module
==
'invoice_supplier'
)
{
$permission
=
$user
->
rights
->
fournisseur
->
facture
->
creer
;
}
elseif
(
$module
==
'order_supplier'
)
{
$permission
=
$user
->
rights
->
fournisseur
->
commande
->
creer
;
}
elseif
(
$module
==
'project'
)
{
$permission
=
$user
->
rights
->
projet
->
creer
;
}
elseif
(
$module
==
'action'
)
{
$permission
=
$user
->
rights
->
agenda
->
myactions
->
create
;
}
elseif
(
$module
==
'shipping'
)
{
$permission
=
$user
->
rights
->
expedition
->
creer
;
}
elseif
(
$module
==
'project_task'
)
{
$permission
=
$user
->
rights
->
projet
->
creer
;
}
elseif
(
!
isset
(
$permission
))
{
$permission
=
$user
->
rights
->
$module
->
creer
;
}
// If already defined by caller page
elseif
(
$module
==
'project'
)
{
$permission
=
$user
->
rights
->
projet
->
creer
;
}
elseif
(
$module
==
'action'
)
{
$permission
=
$user
->
rights
->
agenda
->
myactions
->
create
;
}
elseif
(
$module
==
'shipping'
)
{
$permission
=
$user
->
rights
->
expedition
->
creer
;
}
elseif
(
$module
==
'project_task'
)
{
$permission
=
$user
->
rights
->
projet
->
creer
;
}
elseif
(
!
isset
(
$permission
)
&&
isset
(
$user
->
rights
->
$module
->
creer
))
{
$permission
=
$user
->
rights
->
$module
->
creer
;
}
elseif
(
!
isset
(
$permission
)
&&
isset
(
$user
->
rights
->
$module
->
write
))
{
$permission
=
$user
->
rights
->
$module
->
write
;
}
$formcompany
=
new
FormCompany
(
$db
);
$companystatic
=
new
Societe
(
$db
);
...
...
@@ -228,4 +235,13 @@ $userstatic=new User($db);
<?php
}
}
?>
</div>
<!-- TEMPLATE CONTACTS HOOK BEGIN HERE -->
<?php
if
(
is_object
(
$hookmanager
))
{
$hookmanager
->
initHooks
(
array
(
'contacttpl'
));
$parameters
=
array
();
$reshook
=
$hookmanager
->
executeHooks
(
'formContactTpl'
,
$parameters
,
$object
,
$action
);
}
?>
<!-- END PHP TEMPLATE CONTACTS -->
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment