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
25// Protection to avoid direct call of template
26if (empty($conf) || !is_object($conf)) {
27 print "Error, template page can't be called as URL";
28 exit(1);
29}
30
31
32$contact = $GLOBALS['objcanvas']->control->object;
33
34?>
35
36<!-- BEGIN PHP TEMPLATE CONTACTCARD_EDIT.TPL.PHP DEFAULT -->
37
38<?php
39print load_fiche_titre($this->control->tpl['title']);
40
41dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors']);
42
43echo $this->control->tpl['ajax_selectcountry'];
44?>
45
46<br>
47
48<form method="post" name="formsoc" action="<?php echo $_SERVER["PHP_SELF"].'?id='.GETPOST('id', 'int'); ?>">
49<input type="hidden" name="token" value="<?php echo newToken(); ?>">
50<input type="hidden" name="canvas" value="<?php echo $canvas ?>">
51<input type="hidden" name="id" value="<?php echo GETPOST('id', 'int'); ?>">
52<input type="hidden" name="action" value="update">
53<input type="hidden" name="contactid" value="<?php echo $this->control->tpl['id']; ?>">
54<input type="hidden" name="old_name" value="<?php echo $this->control->tpl['name']; ?>">
55<input type="hidden" name="old_firstname" value="<?php echo $this->control->tpl['firstname']; ?>">
56<?php if (!empty($this->control->tpl['company_id'])) { ?>
57<input type="hidden" name="socid" value="<?php echo $this->control->tpl['company_id']; ?>">
58<?php } ?>
59
60<table class="border allwidth">
61
62<tr>
63 <td><?php echo $langs->trans("Ref"); ?></td>
64 <td colspan="3"><?php echo $this->control->tpl['ref']; ?></td>
65</tr>
66
67<tr>
68 <td width="15%" class="fieldrequired"><?php echo $langs->trans("Lastname").' / '.$langs->trans("Label"); ?></td>
69 <td><input name="lastname" type="text" size="30" maxlength="80" value="<?php echo $this->control->tpl['name']; ?>"></td>
70 <td width="20%"><?php echo $langs->trans("Firstname"); ?></td>
71 <td width="25%"><input name="firstname" type="text" size="30" maxlength="80" value="<?php echo $this->control->tpl['firstname']; ?>"></td>
72</tr>
73
74<tr>
75 <td><?php echo $langs->trans("ThirdParty"); ?></td>
76 <td colspan="3"><?php echo $this->control->tpl['company']; ?></td>
77</tr>
78
79<tr>
80 <td width="15%"><?php echo $langs->trans("UserTitle"); ?></td>
81 <td colspan="3"><?php echo $this->control->tpl['select_civility']; ?></td>
82</tr>
83
84<tr>
85 <td><?php echo $langs->trans("PostOrFunction"); ?></td>
86 <td colspan="3"><input name="poste" type="text" class="minwidth200" maxlength="80" value="<?php echo $this->control->tpl['poste']; ?>"></td>
87</tr>
88
89<tr>
90 <td><?php echo $langs->trans("Address"); ?></td>
91 <td colspan="3"><textarea class="flat" name="address" cols="70"><?php echo $this->control->tpl['address']; ?></textarea></td>
92</tr>
93
94<tr>
95 <td><?php echo $langs->trans("Zip").' / '.$langs->trans("Town"); ?></td>
96 <td colspan="3"><?php echo $this->control->tpl['select_zip'].'&nbsp;'.$this->control->tpl['select_town']; ?></td>
97</tr>
98
99<tr>
100 <td><?php echo $langs->trans("Country"); ?></td>
101 <td colspan="3"><?php echo $this->control->tpl['select_country'].$this->control->tpl['info_admin']; ?></td>
102</tr>
103
104<tr>
105 <td><?php echo $langs->trans('State'); ?></td>
106 <td colspan="3"><?php echo $this->control->tpl['select_state']; ?></td>
107</tr>
108
109<tr>
110 <td><?php echo $langs->trans("PhonePro"); ?></td>
111 <td><input name="phone_pro" type="text" size="18" maxlength="80" value="<?php echo $this->control->tpl['phone_pro']; ?>"></td>
112 <td><?php echo $langs->trans("PhonePerso"); ?></td>
113 <td><input name="phone_perso" type="text" size="18" maxlength="80" value="<?php echo $this->control->tpl['phone_perso']; ?>"></td>
114</tr>
115
116<tr>
117 <td><?php echo $langs->trans("PhoneMobile"); ?></td>
118 <td><input name="phone_mobile" type="text" size="18" maxlength="80" value="<?php echo $this->control->tpl['phone_mobile']; ?>"></td>
119 <td><?php echo $langs->trans("Fax"); ?></td>
120 <td><input name="fax" type="text" size="18" maxlength="80" value="<?php echo $this->control->tpl['fax']; ?>"></td>
121</tr>
122
123<tr>
124 <td><?php echo $langs->trans("Email"); ?></td>
125 <td><input name="email" type="text" class="minwidth200" maxlength="80" value="<?php echo $this->control->tpl['email']; ?>"></td>
126 <?php if ($this->control->tpl['nb_emailing']) { ?>
127 <td class="nowrap"><?php echo $langs->trans("NbOfEMailingsReceived"); ?></td>
128 <td><?php echo $this->control->tpl['nb_emailing']; ?></td>
129 <?php } else { ?>
130 <td colspan="2">&nbsp;</td>
131 <?php } ?>
132</tr>
133
134<tr>
135 <td><?php echo $langs->trans("ContactVisibility"); ?></td>
136 <td colspan="3"><?php echo $this->control->tpl['select_visibility']; ?></td>
137</tr>
138
139<tr>
140 <td class="tdtop"><?php echo $langs->trans("Note"); ?></td>
141 <td colspan="3" valign="top"><textarea name="note" cols="70" rows="<?php echo ROWS_3; ?>"><?php echo $this->control->tpl['note']; ?></textarea></td>
142</tr>
143
144<?php
145if (!empty($this->control->tpl['contact_element'])) {
146 foreach ($this->control->tpl['contact_element'] as $element) {
147 print '<tr>';
148 print '<td>'.$element['linked_element_label'].'</td>';
149 print '<td colspan="3">'.$element['linked_element_value'].'</td>';
150 print '</tr>';
151 }
152} ?>
153
154<tr>
155 <td><?php echo $langs->trans("DolibarrLogin"); ?></td>
156 <td colspan="3"><?php echo $this->control->tpl['dolibarr_user']; ?></td>
157</tr>
158
159<tr>
160 <td colspan="4" class="center">
161 <input type="submit" class="button button-save" name="save" value="<?php echo $langs->trans("Save"); ?>">&nbsp;
162 <input type="submit" class="button button-cancel" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>">
163 </td>
164</tr>
165
166</table><br>
167
168</form>
169
170<!-- 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