dolibarr 21.0.0-beta
contactcard_edit.tpl.php
1<?php
2/* Copyright (C) 2010 Regis Houssin <regis.houssin@inodbox.com>
3 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 */
18
28// Protection to avoid direct call of template
29if (empty($conf) || !is_object($conf)) {
30 print "Error, template page can't be called as URL";
31 exit(1);
32}
33
34
35$contact = $GLOBALS['objcanvas']->control->object;
36
37?>
38
39<!-- BEGIN PHP TEMPLATE CONTACTCARD_EDIT.TPL.PHP DEFAULT -->
40
41<?php
42print load_fiche_titre($this->control->tpl['title']);
43
44dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors']);
45
46echo $this->control->tpl['ajax_selectcountry'];
47?>
48
49<br>
50
51<form method="post" name="formsoc" action="<?php echo $_SERVER["PHP_SELF"].'?id='.GETPOST('id', 'int'); ?>">
52<input type="hidden" name="token" value="<?php echo newToken(); ?>">
53<input type="hidden" name="canvas" value="<?php echo $canvas ?>">
54<input type="hidden" name="id" value="<?php echo GETPOST('id', 'int'); ?>">
55<input type="hidden" name="action" value="update">
56<input type="hidden" name="contactid" value="<?php echo $this->control->tpl['id']; ?>">
57<input type="hidden" name="old_name" value="<?php echo $this->control->tpl['name']; ?>">
58<input type="hidden" name="old_firstname" value="<?php echo $this->control->tpl['firstname']; ?>">
59<?php if (!empty($this->control->tpl['company_id'])) { ?>
60<input type="hidden" name="socid" value="<?php echo $this->control->tpl['company_id']; ?>">
61<?php } ?>
62
63<table class="border allwidth">
64
65<tr>
66 <td><?php echo $langs->trans("Ref"); ?></td>
67 <td colspan="3"><?php echo $this->control->tpl['ref']; ?></td>
68</tr>
69
70<tr>
71 <td width="15%" class="fieldrequired"><?php echo $langs->trans("Lastname").' / '.$langs->trans("Label"); ?></td>
72 <td><input name="lastname" type="text" size="30" maxlength="80" value="<?php echo $this->control->tpl['name']; ?>"></td>
73 <td width="20%"><?php echo $langs->trans("Firstname"); ?></td>
74 <td width="25%"><input name="firstname" type="text" size="30" maxlength="80" value="<?php echo $this->control->tpl['firstname']; ?>"></td>
75</tr>
76
77<tr>
78 <td><?php echo $langs->trans("ThirdParty"); ?></td>
79 <td colspan="3"><?php echo $this->control->tpl['company']; ?></td>
80</tr>
81
82<tr>
83 <td width="15%"><?php echo $langs->trans("UserTitle"); ?></td>
84 <td colspan="3"><?php echo $this->control->tpl['select_civility']; ?></td>
85</tr>
86
87<tr>
88 <td><?php echo $langs->trans("PostOrFunction"); ?></td>
89 <td colspan="3"><input name="poste" type="text" class="minwidth200" maxlength="80" value="<?php echo $this->control->tpl['poste']; ?>"></td>
90</tr>
91
92<tr>
93 <td><?php echo $langs->trans("Address"); ?></td>
94 <td colspan="3"><textarea class="flat" name="address" cols="70"><?php echo $this->control->tpl['address']; ?></textarea></td>
95</tr>
96
97<tr>
98 <td><?php echo $langs->trans("Zip").' / '.$langs->trans("Town"); ?></td>
99 <td colspan="3"><?php echo $this->control->tpl['select_zip'].'&nbsp;'.$this->control->tpl['select_town']; ?></td>
100</tr>
101
102<tr>
103 <td><?php echo $langs->trans("Country"); ?></td>
104 <td colspan="3"><?php echo $this->control->tpl['select_country'].$this->control->tpl['info_admin']; ?></td>
105</tr>
106
107<tr>
108 <td><?php echo $langs->trans('State'); ?></td>
109 <td colspan="3"><?php echo $this->control->tpl['select_state']; ?></td>
110</tr>
111
112<tr>
113 <td><?php echo $langs->trans("PhonePro"); ?></td>
114 <td><input name="phone_pro" type="text" size="18" maxlength="80" value="<?php echo $this->control->tpl['phone_pro']; ?>"></td>
115 <td><?php echo $langs->trans("PhonePerso"); ?></td>
116 <td><input name="phone_perso" type="text" size="18" maxlength="80" value="<?php echo $this->control->tpl['phone_perso']; ?>"></td>
117</tr>
118
119<tr>
120 <td><?php echo $langs->trans("PhoneMobile"); ?></td>
121 <td><input name="phone_mobile" type="text" size="18" maxlength="80" value="<?php echo $this->control->tpl['phone_mobile']; ?>"></td>
122 <td><?php echo $langs->trans("Fax"); ?></td>
123 <td><input name="fax" type="text" size="18" maxlength="80" value="<?php echo $this->control->tpl['fax']; ?>"></td>
124</tr>
125
126<tr>
127 <td><?php echo $langs->trans("Email"); ?></td>
128 <td><input name="email" type="text" class="minwidth200" maxlength="80" value="<?php echo $this->control->tpl['email']; ?>"></td>
129 <?php if ($this->control->tpl['nb_emailing']) { ?>
130 <td class="nowrap"><?php echo $langs->trans("NbOfEMailingsReceived"); ?></td>
131 <td><?php echo $this->control->tpl['nb_emailing']; ?></td>
132 <?php } else { ?>
133 <td colspan="2">&nbsp;</td>
134 <?php } ?>
135</tr>
136
137<tr>
138 <td><?php echo $langs->trans("ContactVisibility"); ?></td>
139 <td colspan="3"><?php echo $this->control->tpl['select_visibility']; ?></td>
140</tr>
141
142<tr>
143 <td class="tdtop"><?php echo $langs->trans("Note"); ?></td>
144 <td colspan="3" valign="top"><textarea name="note" cols="70" rows="<?php echo ROWS_3; ?>"><?php echo $this->control->tpl['note']; ?></textarea></td>
145</tr>
146
147<?php
148if (!empty($this->control->tpl['contact_element'])) {
149 foreach ($this->control->tpl['contact_element'] as $element) {
150 print '<tr>';
151 print '<td>'.$element['linked_element_label'].'</td>';
152 print '<td colspan="3">'.$element['linked_element_value'].'</td>';
153 print '</tr>';
154 }
155} ?>
156
157<tr>
158 <td><?php echo $langs->trans("DolibarrLogin"); ?></td>
159 <td colspan="3"><?php echo $this->control->tpl['dolibarr_user']; ?></td>
160</tr>
161
162<tr>
163 <td colspan="4" class="center">
164 <input type="submit" class="button button-save" name="save" value="<?php echo $langs->trans("Save"); ?>">&nbsp;
165 <input type="submit" class="button button-cancel" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>">
166 </td>
167</tr>
168
169</table><br>
170
171</form>
172
173<!-- END PHP TEMPLATE -->
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
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
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
Definition repair.php:149
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:152