dolibarr  16.0.5
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  *
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
20 if (empty($conf) || !is_object($conf)) {
21  print "Error, template page can't be called as URL";
22  exit;
23 }
24 
25 ?>
26 
27 <!-- BEGIN PHP TEMPLATE CARD_CREATE.TPL.PHP INDIVIDUAL -->
28 
29 <?php echo $this->control->tpl['title']; ?>
30 
31 <?php echo $this->control->tpl['error']; ?>
32 
33 <?php if ($conf->use_javascript_ajax) { ?>
34  <?php echo $this->control->tpl['ajax_selecttype']; ?>
35 <br>
36  <?php echo $langs->trans("ThirdPartyType") ?>: &nbsp;
37 <input type="radio" id="radiocompany" class="flat" name="private" value="0">
38  <?php echo $langs->trans("CompanyFoundation"); ?> &nbsp; &nbsp;
39 <input type="radio" id="radioprivate" class="flat" name="private" value="1" checked> <?php echo $langs->trans("Individual"); ?> (<?php echo $langs->trans("ToCreateContactWithSameName") ?>)
40 <br>
41 <br>
42  <?php echo $this->control->tpl['ajax_selectcountry']; ?>
43 <?php } ?>
44 
45 <form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="POST" name="formsoc">
46 
47 <input type="hidden" name="action" value="add">
48 <input type="hidden" name="canvas" value="<?php echo $canvas ?>">
49 <input type="hidden" name="token" value="<?php echo newToken(); ?>">
50 <input type="hidden" name="private" value="<?php echo $this->control->tpl['particulier']; ?>">
51 <?php if ($this->control->tpl['auto_customercode'] || $this->control->tpl['auto_suppliercode']) { ?>
52 <input type="hidden" name="code_auto" value="1">
53 <?php } ?>
54 
55 <table class="border allwidth">
56 
57 <tr>
58  <td><span class="fieldrequired"><?php echo $langs->trans('LastName'); ?></span></td>
59  <td><input type="text" size="30" maxlength="60" name="nom" value="<?php echo $this->control->tpl['nom']; ?>"></td>
60  <?php if (!empty($conf->global->SOCIETE_USEPREFIX)) { ?>
61  <td><?php echo $langs->trans('Prefix'); ?></td>
62  <td><input type="text" size="5" maxlength="5" name="prefix_comm" value="<?php echo $this->control->tpl['prefix_comm']; ?>"></td>
63  <?php } ?>
64 </tr>
65 
66 <tr>
67  <td><?php echo $langs->trans('FirstName'); ?></td>
68  <td><input type="text" size="30" name="firstname" value="<?php echo $this->control->tpl['firstname']; ?>"></td>
69  <td colspan="2">&nbsp;</td>
70 </tr>
71 
72 <tr>
73  <td><?php echo $langs->trans("UserTitle"); ?></td>
74  <td><?php echo $this->control->tpl['select_civility']; ?></td>
75  <td colspan="2">&nbsp;</td>
76 </tr>
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 
82  <td width="25%"><?php echo $langs->trans('CustomerCode'); ?></td>
83  <td width="25%">
84  <table class="nobordernopadding">
85  <tr>
86  <td><input type="text" name="code_client" size="16" value="<?php echo $this->control->tpl['customercode']; ?>" maxlength="24"></td>
87  <td><?php echo $this->control->tpl['help_customercode']; ?></td>
88  </tr>
89  </table>
90  </td>
91 </tr>
92 
93 <?php if ($this->control->tpl['supplier_enabled']) { ?>
94 <tr>
95  <td><span class="fieldrequired"><?php echo $langs->trans('Supplier'); ?></span></td>
96  <td><?php echo $this->control->tpl['yn_supplier']; ?></td>
97  <td><?php echo $langs->trans('SupplierCode'); ?></td>
98  <td>
99  <table class="nobordernopadding">
100  <tr>
101  <td><input type="text" name="code_fournisseur" size="16" value="<?php echo $this->control->tpl['suppliercode']; ?>" maxlength="24"></td>
102  <td><?php echo $this->control->tpl['help_suppliercode']; ?></td>
103  </tr>
104  </table>
105  </td>
106 </tr>
107 
108  <?php if (count($this->control->tpl['suppliercategory']) > 0) { ?>
109 <tr>
110  <td><?php echo $langs->trans('SupplierCategory'); ?></td>
111  <td colspan="3"><?php echo $this->control->tpl['select_suppliercategory']; ?></td>
112 </tr>
113  <?php }
114 }
115 
116 if (!empty($conf->barcode->enabled)) { ?>
117 <tr>
118  <td><?php echo $langs->trans('Gencod'); ?></td>
119  <td colspan="3"><input type="text" name="barcode" value="<?php echo $this->control->tpl['barcode']; ?>"></td>
120 </tr>
121 <?php } ?>
122 
123 <tr>
124  <td class="tdtop"><?php echo $langs->trans('Address'); ?></td>
125  <td colspan="3"><textarea name="adresse" cols="40" rows="3"><?php echo $this->control->tpl['address']; ?></textarea></td>
126 </tr>
127 
128 <tr>
129  <td><?php echo $langs->trans('Zip'); ?></td>
130  <td><input size="6" type="text" name="zip" value="<?php echo $this->control->tpl['zip']; ?>"><?php echo $this->control->tpl['autofilltownfromzip']; ?></td>
131  <td><?php echo $langs->trans('Town'); ?></td>
132  <td><input type="text" name="town" value="<?php echo $this->control->tpl['town']; ?>"></td>
133 </tr>
134 
135 <tr>
136  <td width="25%"><?php echo $langs->trans('Country'); ?></td>
137  <td colspan="3"><?php echo $this->control->tpl['select_country']; echo $this->control->tpl['info_admin']; ?></td>
138 </tr>
139 
140 <tr>
141  <td><?php echo $langs->trans('State'); ?></td>
142  <td colspan="3"><?php echo $this->control->tpl['select_state']; ?></td>
143 </tr>
144 
145 <tr>
146  <td><?php echo $langs->trans('Phone'); ?></td>
147  <td><input type="text" name="tel" value="<?php echo $this->control->tpl['tel']; ?>"></td>
148  <td><?php echo $langs->trans('Fax'); ?></td>
149  <td><input type="text" name="fax" value="<?php echo $this->control->tpl['fax']; ?>"></td>
150 </tr>
151 
152 <tr>
153  <td><?php echo $langs->trans('EMail').($conf->global->SOCIETE_EMAIL_MANDATORY ? '*' : ''); ?></td>
154  <td><input type="text" name="email" size="32" value="<?php echo $this->control->tpl['email']; ?>"></td>
155  <td><?php echo $langs->trans('Web'); ?></td>
156  <td><input type="text" name="url" size="32" value="<?php echo $this->control->tpl['url']; ?>"></td>
157 </tr>
158 
159 <?php if (!empty($conf->global->MAIN_MULTILANGS)) { ?>
160 <tr>
161  <td><?php echo $langs->trans("DefaultLang"); ?></td>
162  <td colspan="3"><?php echo $this->control->tpl['select_lang']; ?></td>
163 </tr>
164 <?php } ?>
165 
166 <tr>
167  <td><?php echo $langs->trans('VATIsUsed'); ?></td>
168  <td colspan="3"><?php echo $this->control->tpl['yn_assujtva']; ?></td>
169 </tr>
170 
171 <?php if (!empty($this->control->tpl['localtax'])) {
172  echo $this->control->tpl['localtax'];
173 } ?>
174 
175 <?php if ($user->rights->societe->client->voir) { ?>
176 <tr>
177  <td><?php echo $langs->trans("AllocateCommercial"); ?></td>
178  <td colspan="3"><?php echo $this->control->tpl['select_users']; ?></td>
179 </tr>
180 <?php } ?>
181 
182 <tr>
183  <td colspan="4" class="center"><input type="submit" class="button" value="<?php echo $langs->trans('AddThirdParty'); ?>"></td>
184 </tr>
185 
186 </table>
187 </form>
188 
189 <!-- END PHP TEMPLATE -->
name
$conf db name
Definition: repair.php:122
type
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
Definition: repair.php:119