dolibarr 21.0.0-beta
adherentcard_view.tpl.php
1<?php
2/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
3 * Copyright (C) 2012-2022 Philippe Grand <philippe.grand@atoo-net.com>
4 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
27// Protection to avoid direct call of template
28if (empty($conf) || !is_object($conf)) {
29 print "Error, template page can't be called as URL";
30 exit(1);
31}
32
33
34$contact = $GLOBALS['objcanvas']->control->object;
35
36echo "<!-- BEGIN PHP TEMPLATE ADHERENTCARD_VIEW.TPL.PHP DEFAULT -->\n";
37echo $this->control->tpl['showhead'];
38
39dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors']);
40if (!empty($this->control->tpl['action_create_user'])) {
41 echo $this->control->tpl['action_create_user'];
42}
43if (!empty($this->control->tpl['action_delete'])) {
44 echo $this->control->tpl['action_delete'];
45} ?>
46
47<table class="border allwidth">
48
49<tr>
50 <td width="20%"><?php echo $langs->trans("Ref"); ?></td>
51 <td colspan="3"><?php echo $this->control->tpl['showrefnav']; ?></td>
52</tr>
53
54<tr>
55 <td width="20%"><?php echo $langs->trans("Lastname"); ?></td>
56 <td width="30%"><?php echo $this->control->tpl['name']; ?></td>
57 <td width="25%"><?php echo $langs->trans("Firstname"); ?></td>
58 <td width="25%"><?php echo $this->control->tpl['firstname']; ?></td>
59</tr>
60
61<tr>
62 <td><?php echo $langs->trans("Company"); ?></td>
63 <td colspan="3"><?php echo $this->control->tpl['company']; ?></td>
64</tr>
65
66<tr>
67 <td width="15%"><?php echo $langs->trans("UserTitle"); ?></td>
68 <td colspan="3"><?php echo $this->control->tpl['civility']; ?></td>
69</tr>
70
71<tr>
72 <td><?php echo $langs->trans("Morphy"); ?></td>
73 <td colspan="3"><?php echo $this->control->tpl['select_morphy']; ?></td>
74</tr>
75
76<tr>
77 <td><?php echo $langs->trans("Address"); ?></td>
78 <td colspan="3"><?php echo $this->control->tpl['address']; ?></td>
79</tr>
80
81<tr>
82 <td><?php echo $langs->trans("Zip").' / '.$langs->trans("Town"); ?></td>
83 <td colspan="3"><?php echo $this->control->tpl['zip'].$this->control->tpl['town']; ?></td>
84</tr>
85
86<tr>
87 <td><?php echo $langs->trans("Country"); ?></td>
88 <td colspan="3"><?php echo $this->control->tpl['country']; ?></td>
89</tr>
90
91<tr>
92 <td><?php echo $langs->trans('State'); ?></td>
93 <td colspan="3"><?php echo $this->control->tpl['state']; ?></td>
94</tr>
95
96<tr>
97 <td><?php echo $langs->trans("PhonePro"); ?></td>
98 <td><?php echo $this->control->tpl['phone_pro']; ?></td>
99 <td><?php echo $langs->trans("PhonePerso"); ?></td>
100 <td><?php echo $this->control->tpl['phone_perso']; ?></td>
101</tr>
102
103<tr>
104 <td><?php echo $langs->trans("PhoneMobile"); ?></td>
105 <td><?php echo $this->control->tpl['phone_mobile']; ?></td>
106</tr>
107
108<tr>
109 <td><?php echo $langs->trans("EMail"); ?></td>
110 <td><?php echo $this->control->tpl['email']; ?></td>
111</tr>
112
113<tr>
114 <td><?php echo $langs->trans("ContactVisibility"); ?></td>
115 <td colspan="3"><?php echo $this->control->tpl['visibility']; ?></td>
116</tr>
117
118<tr>
119 <td class="tdtop"><?php echo $langs->trans("Note"); ?></td>
120 <td colspan="3"><?php echo $this->control->tpl['note']; ?></td>
121</tr>
122
123<tr>
124 <td><?php echo $langs->trans("DolibarrLogin"); ?></td>
125 <td colspan="3"><?php echo $this->control->tpl['dolibarr_user']; ?></td>
126</tr>
127
128</table>
129
130<?php echo $this->control->tpl['showend'];
131
132if (empty($user->socid)) {
133 echo '<div class="tabsAction">';
134
135 if ($user->hasRight('adherent', 'creer')) {
136 echo '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=edit&token='.newToken().'&canvas='.$canvas.'">'.$langs->trans('Modify').'</a>';
137 }
138
139 if (!$this->control->tpl['user_id'] && $user->hasRight('user', 'user', 'creer')) {
140 echo '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=create_user&token='.newToken().'&canvas='.$canvas.'">'.$langs->trans("CreateDolibarrLogin").'</a>';
141 }
142
143 if ($user->hasRight('adherent', 'supprimer')) {
144 print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=delete&token='.newToken().'&canvas='.$canvas, 'delete', $user->hasRight('adherent', 'supprimer'));
145 }
146
147 echo '</div><br>';
148}
149
150echo $this->control->tpl['actionstodo'];
151
152echo $this->control->tpl['actionsdone'];
153
154echo "<!-- END PHP TEMPLATE -->\n";
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dolGetButtonAction($label, $text='', $actionType='default', $url='', $id='', $userRight=1, $params=array())
Function dolGetButtonAction.
dol_htmloutput_errors($mesgstring='', $mesgarray=array(), $keepembedded=0)
Print formatted error messages to output (Used to show messages on html output).
treeview li table
No Email.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79