dolibarr 21.0.0-beta
card_create.tpl.php
1<?php
2/* Copyright (C) 2010-2011 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_CREATE.TPL.PHP INDIVIDUAL -->
40
41<?php echo $this->control->tpl['title']; ?>
42
43<?php echo $this->control->tpl['error']; ?>
44
45<?php if ($conf->use_javascript_ajax) { ?>
46 <?php echo $this->control->tpl['ajax_selecttype']; ?>
47<br>
48 <?php echo $langs->trans("ThirdPartyType") ?>: &nbsp;
49<input type="radio" id="radiocompany" class="flat" name="private" value="0">
50 <?php echo $langs->trans("CompanyFoundation"); ?> &nbsp; &nbsp;
51<input type="radio" id="radioprivate" class="flat" name="private" value="1" checked> <?php echo $langs->trans("Individual"); ?> (<?php echo $langs->trans("ToCreateContactWithSameName") ?>)
52<br>
53<br>
54 <?php echo $this->control->tpl['ajax_selectcountry']; ?>
55<?php } ?>
56
57<form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="POST" name="formsoc">
58
59<input type="hidden" name="action" value="add">
60<input type="hidden" name="canvas" value="<?php echo $canvas ?>">
61<input type="hidden" name="token" value="<?php echo newToken(); ?>">
62<input type="hidden" name="private" value="<?php echo $this->control->tpl['particulier']; ?>">
63<?php if ($this->control->tpl['auto_customercode'] || $this->control->tpl['auto_suppliercode']) { ?>
64<input type="hidden" name="code_auto" value="1">
65<?php } ?>
66
67<table class="border allwidth">
68
69<tr>
70 <td><span class="fieldrequired"><?php echo $langs->trans('LastName'); ?></span></td>
71 <td><input type="text" size="30" maxlength="60" name="nom" value="<?php echo $this->control->tpl['nom']; ?>"></td>
72 <?php if (getDolGlobalString('SOCIETE_USEPREFIX')) { ?>
73 <td><?php echo $langs->trans('Prefix'); ?></td>
74 <td><input type="text" size="5" maxlength="5" name="prefix_comm" value="<?php echo $this->control->tpl['prefix_comm']; ?>"></td>
75 <?php } ?>
76</tr>
77
78<tr>
79 <td><?php echo $langs->trans('FirstName'); ?></td>
80 <td><input type="text" size="30" name="firstname" value="<?php echo $this->control->tpl['firstname']; ?>"></td>
81 <td colspan="2">&nbsp;</td>
82</tr>
83
84<tr>
85 <td><?php echo $langs->trans("UserTitle"); ?></td>
86 <td><?php echo $this->control->tpl['select_civility']; ?></td>
87 <td colspan="2">&nbsp;</td>
88</tr>
89
90<tr>
91 <td width="25%"><span class="fieldrequired"><?php echo $langs->trans('ProspectCustomer'); ?></span></td>
92 <td width="25%"><?php echo $this->control->tpl['select_customertype']; ?></td>
93
94 <td width="25%"><?php echo $langs->trans('CustomerCode'); ?></td>
95 <td width="25%">
96 <table class="nobordernopadding">
97 <tr>
98 <td><input type="text" name="code_client" size="16" value="<?php echo $this->control->tpl['customercode']; ?>" maxlength="24"></td>
99 <td><?php echo $this->control->tpl['help_customercode']; ?></td>
100 </tr>
101 </table>
102 </td>
103</tr>
104
105<?php if ($this->control->tpl['supplier_enabled']) { ?>
106<tr>
107 <td><span class="fieldrequired"><?php echo $langs->trans('Supplier'); ?></span></td>
108 <td><?php echo $this->control->tpl['yn_supplier']; ?></td>
109 <td><?php echo $langs->trans('SupplierCode'); ?></td>
110 <td>
111 <table class="nobordernopadding">
112 <tr>
113 <td><input type="text" name="code_fournisseur" size="16" value="<?php echo $this->control->tpl['suppliercode']; ?>" maxlength="24"></td>
114 <td><?php echo $this->control->tpl['help_suppliercode']; ?></td>
115 </tr>
116 </table>
117 </td>
118</tr>
119
120 <?php if (count($this->control->tpl['suppliercategory']) > 0) { ?>
121<tr>
122 <td><?php echo $langs->trans('SupplierCategory'); ?></td>
123 <td colspan="3"><?php echo $this->control->tpl['select_suppliercategory']; ?></td>
124</tr>
125 <?php }
126}
127
128if (isModEnabled('barcode')) { ?>
129<tr>
130 <td><?php echo $langs->trans('Gencod'); ?></td>
131 <td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td>
132</tr>
133<?php } ?>
134
135<tr>
136 <td class="tdtop"><?php echo $langs->trans('Address'); ?></td>
137 <td colspan="3"><textarea name="address" cols="40" rows="3"><?php echo $this->control->tpl['address']; ?></textarea></td>
138</tr>
139
140<tr>
141 <td><?php echo $langs->trans('Zip'); ?></td>
142 <td><input size="6" type="text" name="zip" value="<?php echo $this->control->tpl['zip']; ?>"><?php echo $this->control->tpl['autofilltownfromzip']; ?></td>
143 <td><?php echo $langs->trans('Town'); ?></td>
144 <td><input type="text" name="town" value="<?php echo $this->control->tpl['town']; ?>"></td>
145</tr>
146
147<tr>
148 <td width="25%"><?php echo $langs->trans('Country'); ?></td>
149 <td colspan="3"><?php echo $this->control->tpl['select_country']; echo $this->control->tpl['info_admin']; ?></td>
150</tr>
151
152<tr>
153 <td><?php echo $langs->trans('State'); ?></td>
154 <td colspan="3"><?php echo $this->control->tpl['select_state']; ?></td>
155</tr>
156
157<tr>
158 <td><?php echo $langs->trans('Phone'); ?></td>
159 <td><input type="text" name="phone" value="<?php echo $this->control->tpl['phone']; ?>"></td>
160 <td><?php echo $langs->trans('PhoneMobile'); ?></td>
161 <td><input type="text" name="phone_mobile" value="<?php echo $this->control->tpl['phone_mobile']; ?>"></td>
162 <td><?php echo $langs->trans('Fax'); ?></td>
163 <td><input type="text" name="fax" value="<?php echo $this->control->tpl['fax']; ?>"></td>
164</tr>
165
166<tr>
167 <td><?php echo $langs->trans('EMail').($conf->global->SOCIETE_EMAIL_MANDATORY ? '*' : ''); ?></td>
168 <td><input type="text" name="email" size="32" value="<?php echo $this->control->tpl['email']; ?>"></td>
169 <td><?php echo $langs->trans('Web'); ?></td>
170 <td><input type="text" name="url" size="32" value="<?php echo $this->control->tpl['url']; ?>"></td>
171</tr>
172
173<?php if (getDolGlobalInt('MAIN_MULTILANGS')) { ?>
174<tr>
175 <td><?php echo $langs->trans("DefaultLang"); ?></td>
176 <td colspan="3"><?php echo $this->control->tpl['select_lang']; ?></td>
177</tr>
178<?php } ?>
179
180<tr>
181 <td><?php echo $langs->trans('VATIsUsed'); ?></td>
182 <td colspan="3"><?php echo $this->control->tpl['yn_assujtva']; ?></td>
183</tr>
184
185<?php if (!empty($this->control->tpl['localtax'])) {
186 echo $this->control->tpl['localtax'];
187} ?>
188
189<?php if ($user->hasRight('societe', 'client', 'voir')) { ?>
190<tr>
191 <td><?php echo $langs->trans("AllocateCommercial"); ?></td>
192 <td colspan="3"><?php echo $this->control->tpl['select_users']; ?></td>
193</tr>
194<?php } ?>
195
196<tr>
197 <td colspan="4" class="center"><input type="submit" class="button" value="<?php echo $langs->trans('AddThirdParty'); ?>"></td>
198</tr>
199
200</table>
201</form>
202
203<!-- 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