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
30// Protection to avoid direct call of template
31if (empty($conf) || !is_object($conf)) {
32 print "Error, template page can't be called as URL";
33 exit(1);
34}
35
36
37$contact = $GLOBALS['objcanvas']->control->object;
38
39echo "<!-- BEGIN PHP TEMPLATE ADHERENTCARD_VIEW.TPL.PHP DEFAULT -->\n";
40echo $this->control->tpl['showhead'];
41
42dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors']);
43if (!empty($this->control->tpl['action_create_user'])) {
44 echo $this->control->tpl['action_create_user'];
45}
46if (!empty($this->control->tpl['action_delete'])) {
47 echo $this->control->tpl['action_delete'];
48} ?>
49
50<table class="border allwidth">
51
52<tr>
53 <td width="20%"><?php echo $langs->trans("Ref"); ?></td>
54 <td colspan="3"><?php echo $this->control->tpl['showrefnav']; ?></td>
55</tr>
56
57<tr>
58 <td width="20%"><?php echo $langs->trans("Lastname"); ?></td>
59 <td width="30%"><?php echo $this->control->tpl['name']; ?></td>
60 <td width="25%"><?php echo $langs->trans("Firstname"); ?></td>
61 <td width="25%"><?php echo $this->control->tpl['firstname']; ?></td>
62</tr>
63
64<tr>
65 <td><?php echo $langs->trans("Company"); ?></td>
66 <td colspan="3"><?php echo $this->control->tpl['company']; ?></td>
67</tr>
68
69<tr>
70 <td width="15%"><?php echo $langs->trans("UserTitle"); ?></td>
71 <td colspan="3"><?php echo $this->control->tpl['civility']; ?></td>
72</tr>
73
74<tr>
75 <td><?php echo $langs->trans("Morphy"); ?></td>
76 <td colspan="3"><?php echo $this->control->tpl['select_morphy']; ?></td>
77</tr>
78
79<tr>
80 <td><?php echo $langs->trans("Address"); ?></td>
81 <td colspan="3"><?php echo $this->control->tpl['address']; ?></td>
82</tr>
83
84<tr>
85 <td><?php echo $langs->trans("Zip").' / '.$langs->trans("Town"); ?></td>
86 <td colspan="3"><?php echo $this->control->tpl['zip'].$this->control->tpl['town']; ?></td>
87</tr>
88
89<tr>
90 <td><?php echo $langs->trans("Country"); ?></td>
91 <td colspan="3"><?php echo $this->control->tpl['country']; ?></td>
92</tr>
93
94<tr>
95 <td><?php echo $langs->trans('State'); ?></td>
96 <td colspan="3"><?php echo $this->control->tpl['state']; ?></td>
97</tr>
98
99<tr>
100 <td><?php echo $langs->trans("PhonePro"); ?></td>
101 <td><?php echo $this->control->tpl['phone_pro']; ?></td>
102 <td><?php echo $langs->trans("PhonePerso"); ?></td>
103 <td><?php echo $this->control->tpl['phone_perso']; ?></td>
104</tr>
105
106<tr>
107 <td><?php echo $langs->trans("PhoneMobile"); ?></td>
108 <td><?php echo $this->control->tpl['phone_mobile']; ?></td>
109</tr>
110
111<tr>
112 <td><?php echo $langs->trans("EMail"); ?></td>
113 <td><?php echo $this->control->tpl['email']; ?></td>
114</tr>
115
116<tr>
117 <td><?php echo $langs->trans("ContactVisibility"); ?></td>
118 <td colspan="3"><?php echo $this->control->tpl['visibility']; ?></td>
119</tr>
120
121<tr>
122 <td class="tdtop"><?php echo $langs->trans("Note"); ?></td>
123 <td colspan="3"><?php echo $this->control->tpl['note']; ?></td>
124</tr>
125
126<tr>
127 <td><?php echo $langs->trans("DolibarrLogin"); ?></td>
128 <td colspan="3"><?php echo $this->control->tpl['dolibarr_user']; ?></td>
129</tr>
130
131</table>
132
133<?php echo $this->control->tpl['showend'];
134
135if (empty($user->socid)) {
136 echo '<div class="tabsAction">';
137
138 if ($user->hasRight('adherent', 'creer')) {
139 echo '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=edit&token='.newToken().'&canvas='.$canvas.'">'.$langs->trans('Modify').'</a>';
140 }
141
142 if (!$this->control->tpl['user_id'] && $user->hasRight('user', 'user', 'creer')) {
143 echo '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$this->control->tpl['id'].'&action=create_user&token='.newToken().'&canvas='.$canvas.'">'.$langs->trans("CreateDolibarrLogin").'</a>';
144 }
145
146 if ($user->hasRight('adherent', 'supprimer')) {
147 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'));
148 }
149
150 echo '</div><br>';
151}
152
153echo $this->control->tpl['actionstodo'];
154
155echo $this->control->tpl['actionsdone'];
156
157echo "<!-- 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