dolibarr 21.0.0-beta
contactcard_create.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
28// Protection to avoid direct call of template
29if (empty($conf) || !is_object($conf)) {
30 print "Error, template page can't be called as URL";
31 exit(1);
32}
33
34?>
35
36<!-- BEGIN PHP TEMPLATE CONTACTCARD_CREATE.TPL.PHP DEFAULT -->
37
38<?php
39print load_fiche_titre($this->control->tpl['title']);
40
41dol_htmloutput_errors((is_numeric($object->error) ? '' : $object->error), $object->errors);
42
43dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors']);
44
45echo $this->control->tpl['ajax_selectcountry']; ?>
46
47<br>
48
49<form method="post" name="formsoc" action="<?php echo $_SERVER["PHP_SELF"]; ?>">
50<input type="hidden" name="token" value="<?php echo newToken(); ?>">
51<input type="hidden" name="canvas" value="<?php echo $canvas ?>">
52<input type="hidden" name="action" value="add">
53<?php if ($this->control->tpl['company_id']) { ?>
54<input type="hidden" name="socid" value="<?php echo $this->control->tpl['company_id']; ?>">
55<?php } ?>
56
57<table class="border allwidth">
58
59<tr>
60 <td width="15%" class="fieldrequired"><?php echo $langs->trans("Lastname").' / '.$langs->trans("Label"); ?></td>
61 <td><input name="lastname" type="text" size="30" maxlength="80" value="<?php echo $this->control->tpl['name']; ?>"></td>
62 <td width="20%"><?php echo $langs->trans("Firstname"); ?></td>
63 <td width="25%"><input name="firstname" type="text" size="30" maxlength="80" value="<?php echo $this->control->tpl['firstname']; ?>"></td>
64</tr>
65
66<tr>
67 <td><?php echo $langs->trans("ThirdParty"); ?></td>
68 <td colspan="3"><?php echo $this->control->tpl['company']; ?></td>
69</tr>
70
71<tr>
72 <td width="15%"><?php echo $langs->trans("UserTitle"); ?></td>
73 <td colspan="3"><?php echo $this->control->tpl['select_civility']; ?></td>
74</tr>
75
76<tr>
77 <td><?php echo $langs->trans("PostOrFunction"); ?></td>
78 <td colspan="3"><input name="poste" type="text" class="minwidth200" maxlength="80" value="<?php echo $this->control->tpl['poste']; ?>"></td>
79</tr>
80
81<tr>
82 <td><?php echo $langs->trans("Address"); ?></td>
83 <td colspan="3"><textarea class="flat" name="address" cols="70"><?php echo $this->control->tpl['address']; ?></textarea></td>
84</tr>
85
86<tr>
87 <td><?php echo $langs->trans("Zip").' / '.$langs->trans("Town"); ?></td>
88 <td colspan="3"><?php echo $this->control->tpl['select_zip'].'&nbsp;'.$this->control->tpl['select_town']; ?></td>
89</tr>
90
91<tr>
92 <td><?php echo $langs->trans("Country"); ?></td>
93 <td colspan="3"><?php echo $this->control->tpl['select_country'].$this->control->tpl['info_admin']; ?></td>
94</tr>
95
96<tr>
97 <td><?php echo $langs->trans('State'); ?></td>
98 <td colspan="3"><?php echo $this->control->tpl['select_state']; ?></td>
99</tr>
100
101<tr>
102 <td><?php echo $langs->trans("PhonePro"); ?></td>
103 <td><input name="phone_pro" type="text" size="18" maxlength="80" value="<?php echo $this->control->tpl['phone_pro']; ?>"></td>
104 <td><?php echo $langs->trans("PhonePerso"); ?></td>
105 <td><input name="phone_perso" type="text" size="18" maxlength="80" value="<?php echo $this->control->tpl['phone_perso']; ?>"></td>
106</tr>
107
108<tr>
109 <td><?php echo $langs->trans("PhoneMobile"); ?></td>
110 <td><input name="phone_mobile" type="text" size="18" maxlength="80" value="<?php echo $this->control->tpl['phone_mobile']; ?>"></td>
111 <td><?php echo $langs->trans("Fax"); ?></td>
112 <td><input name="fax" type="text" size="18" maxlength="80" value="<?php echo $this->control->tpl['fax']; ?>"></td>
113</tr>
114
115<tr>
116 <td><?php echo $langs->trans("Email"); ?></td>
117 <td colspan="3"><input name="email" type="text" class="minwidth200" maxlength="80" value="<?php echo $this->control->tpl['email']; ?>"></td>
118</tr>
119
120<tr>
121 <td><?php echo $langs->trans("ContactVisibility"); ?></td>
122 <td colspan="3"><?php echo $this->control->tpl['select_visibility']; ?></td>
123</tr>
124
125<tr>
126 <td class="tdtop"><?php echo $langs->trans("Note"); ?></td>
127 <td colspan="3" valign="top"><textarea name="note" cols="70" rows="<?php echo ROWS_3; ?>"><?php echo $this->control->tpl['note']; ?></textarea></td>
128</tr>
129
130<tr>
131 <td class="center" colspan="4"><input type="submit" class="button" value="<?php echo $langs->trans("Add"); ?>"></td>
132</tr>
133
134</table><br>
135
136</form>
137
138<!-- END PHP TEMPLATE -->
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:66
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