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