dolibarr 21.0.0-beta
card_edit.tpl.php
1<?php
2/* Copyright (C) 2010 Regis Houssin <regis.houssin@inodbox.com>
3 * Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
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
31// Protection to avoid direct call of template
32if (empty($conf) || !is_object($conf)) {
33 print "Error, template page can't be called as URL";
34 exit(1);
35}
36
37?>
38
39<!-- BEGIN PHP TEMPLATE CARD_EDIT.TPL.PHP INDIVIDUAL -->
40
41<?php echo $this->control->tpl['title']; ?>
42
43<?php echo $this->control->tpl['error']; ?>
44
45<?php echo $this->control->tpl['ajax_selectcountry']; ?>
46
47<form action="<?php echo $_SERVER["PHP_SELF"].'?socid='.$this->control->tpl['id']; ?>" method="POST" name="formsoc">
48<input type="hidden" name="canvas" value="<?php echo $canvas ?>">
49<input type="hidden" name="action" value="update">
50<input type="hidden" name="token" value="<?php echo newToken(); ?>">
51<input type="hidden" name="socid" value="<?php echo $this->control->tpl['id']; ?>">
52<input type="hidden" name="typent_id" value="<?php echo $this->control->tpl['typent_id']; ?>">
53<?php if ($this->control->tpl['auto_customercode'] || $this->control->tpl['auto_suppliercode']) { ?>
54<input type="hidden" name="code_auto" value="1">
55<?php } ?>
56
57<table class="border allwidth">
58
59<tr>
60 <td><span class="fieldrequired"><?php echo $langs->trans('Name'); ?></span></td>
61 <td colspan="3"><input type="text" size="40" maxlength="60" name="nom" value="<?php echo $this->control->tpl['nom']; ?>"></td>
62</tr>
63
64<?php if (getDolGlobalString('SOCIETE_USEPREFIX')) { ?>
65<tr>
66 <td><?php echo $langs->trans("Prefix"); ?></td>
67 <td colspan="3">
68 <?php if (($this->control->tpl['prefix_customercode'] || $this->control->tpl['prefix_suppliercode']) && $this->control->tpl['prefix_comm']) { ?>
69 <input type="hidden" name="prefix_comm" value="<?php echo $this->control->tpl['prefix_comm']; ?>">
70 <?php echo $this->control->tpl['prefix_comm']; ?>
71 <?php } else { ?>
72 <input type="text" size="5" maxlength="5" name="prefix_comm" value="<?php echo $this->control->tpl['prefix_comm']; ?>">
73 <?php } ?>
74 </td>
75</tr>
76<?php } ?>
77
78<tr>
79 <td width="25%"><span class="fieldrequired"><?php echo $langs->trans('ProspectCustomer'); ?></span></td>
80 <td width="25%"><?php echo $this->control->tpl['select_customertype']; ?></td>
81 <td width="25%"><?php echo $langs->trans('CustomerCode'); ?></td>
82 <td width="25%">
83 <table class="nobordernopadding">
84 <tr>
85 <td>
86 <?php if ($this->control->tpl['ismodifiable_customercode']) { ?>
87 <input type="text" name="code_client" size="16" value="<?php echo $this->control->tpl['customercode']; ?>" maxlength="24">
88 <?php } else { ?>
89 <?php echo $this->control->tpl['customercode']; ?>
90 <input type="hidden" name="code_client" value="<?php echo $this->control->tpl['customercode']; ?>">
91 <?php } ?>
92 </td>
93 <td><?php echo $this->tpl['help_customercode']; ?></td>
94 </tr>
95 </table>
96 </td>
97</tr>
98
99<tr>
100 <td><span class="fieldrequired"><?php echo $langs->trans('Supplier'); ?></span></td>
101 <td><?php echo $this->control->tpl['yn_supplier']; ?></td>
102 <td><?php echo $langs->trans('SupplierCode'); ?></td>
103 <td>
104 <table class="nobordernopadding">
105 <tr>
106 <td>
107 <?php if ($this->control->tpl['ismodifiable_suppliercode']) { ?>
108 <input type="text" name="code_fournisseur" size="16" value="<?php echo $this->control->tpl['suppliercode']; ?>" maxlength="24">
109 <?php } else { ?>
110 <?php echo $this->control->tpl['suppliercode']; ?>
111 <input type="hidden" name="code_fournisseur" value="<?php echo $this->control->tpl['suppliercode']; ?>">
112 <?php } ?>
113 </td>
114 <td><?php echo $this->tpl['help_suppliercode']; ?></td>
115 </tr>
116 </table>
117 </td>
118</tr>
119
120<?php
121if ($this->control->tpl['fournisseur']) {
122 if (count($this->control->tpl['suppliercategory']) > 0) { ?>
123<tr>
124 <td><?php echo $langs->trans('SupplierCategory'); ?></td>
125 <td colspan="3"><?php echo $this->control->tpl['select_suppliercategory']; ?></td>
126</tr>
127 <?php
128 }
129}
130?>
131
132<?php if (isModEnabled('barcode')) { ?>
133<tr>
134 <td><?php echo $langs->trans('Gencod'); ?></td>
135 <td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td>
136</tr>
137<?php } ?>
138
139<tr>
140 <td class="tdtop"><?php echo $langs->trans('Address'); ?></td>
141 <td colspan="3"><textarea name="address" cols="40" rows="3"><?php echo $this->control->tpl['address']; ?></textarea></td>
142</tr>
143
144<tr>
145 <td><?php echo $langs->trans('Zip'); ?></td>
146 <td><?php echo $this->control->tpl['select_zip']; ?></td>
147 <td><?php echo $langs->trans('Town'); ?></td>
148 <td><?php echo $this->control->tpl['select_town']; ?></td>
149</tr>
150
151<tr>
152 <td width="25%"><?php echo $langs->trans('Country'); ?></td>
153 <td colspan="3"><?php echo $this->control->tpl['select_country']; echo $this->control->tpl['info_admin']; ?></td>
154</tr>
155
156<tr>
157 <td><?php echo $langs->trans('State'); ?></td>
158 <td colspan="3"><?php echo $this->control->tpl['select_state']; ?></td>
159</tr>
160
161<tr>
162 <td><?php echo $langs->trans('Phone'); ?></td>
163 <td><input type="text" name="phone" value="<?php echo $this->control->tpl['phone']; ?>"></td>
164 <td><?php echo $langs->trans('PhoneMobile'); ?></td>
165 <td><input type="text" name="phone_mobile" value="<?php echo $this->control->tpl['phone_mobile']; ?>"></td>
166 <td><?php echo $langs->trans('Fax'); ?></td>
167 <td><input type="text" name="fax" value="<?php echo $this->control->tpl['fax']; ?>"></td>
168</tr>
169
170<tr>
171 <td><?php echo $langs->trans('EMail').($conf->global->SOCIETE_EMAIL_MANDATORY ? '*' : ''); ?></td>
172 <td><input type="text" name="email" size="32" value="<?php echo $this->control->tpl['email']; ?>"></td>
173 <td><?php echo $langs->trans('Web'); ?></td>
174 <td><input type="text" name="url" size="32" value="<?php echo $this->control->tpl['url']; ?>"></td>
175</tr>
176
177<?php if (getDolGlobalInt('MAIN_MULTILANGS')) { ?>
178<tr>
179 <td><?php echo $langs->trans("DefaultLang"); ?></td>
180 <td colspan="3"><?php echo $this->control->tpl['select_lang']; ?></td>
181</tr>
182<?php } ?>
183
184<tr>
185 <td><?php echo $langs->trans('VATIsUsed'); ?></td>
186 <td colspan="3"><?php echo $this->control->tpl['yn_assujtva']; ?></td>
187</tr>
188
189<?php if (!empty($this->control->tpl['localtax'])) {
190 echo $this->control->tpl['localtax'];
191} ?>
192
193</table>
194<br>
195
196<div class="center">
197<input type="submit" class="button button-save" name="save" value="<?php echo $langs->trans("Save"); ?>">
198&nbsp; &nbsp;
199<input type="submit" class="button button-cancel" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>">
200</div>
201
202</form>
203
204<!-- END PHP TEMPLATE -->
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
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