dolibarr  7.0.0-beta
contactcard_edit.tpl.php
1 <?php
2 /* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 // Protection to avoid direct call of template
19 if (empty($conf) || ! is_object($conf))
20 {
21  print "Error, template page can't be called as URL";
22  exit;
23 }
24 
25 
26 $contact = $GLOBALS['objcanvas']->control->object;
27 
28 ?>
29 
30 <!-- BEGIN PHP TEMPLATE CONTACTCARD_EDIT.TPL.PHP DEFAULT -->
31 
32 <?php
33 print load_fiche_titre($this->control->tpl['title']);
34 
35 dol_htmloutput_errors($this->control->tpl['error'],$this->control->tpl['errors']);
36 
37 echo $this->control->tpl['ajax_selectcountry'];
38 ?>
39 
40 <br>
41 
42 <form method="post" name="formsoc" action="<?php echo $_SERVER["PHP_SELF"].'?id='.GETPOST('id','int'); ?>">
43 <input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>">
44 <input type="hidden" name="canvas" value="<?php echo $canvas ?>">
45 <input type="hidden" name="id" value="<?php echo GETPOST('id','int'); ?>">
46 <input type="hidden" name="action" value="update">
47 <input type="hidden" name="contactid" value="<?php echo $this->control->tpl['id']; ?>">
48 <input type="hidden" name="old_name" value="<?php echo $this->control->tpl['name']; ?>">
49 <input type="hidden" name="old_firstname" value="<?php echo $this->control->tpl['firstname']; ?>">
50 <?php if (! empty($this->control->tpl['company_id'])) { ?>
51 <input type="hidden" name="socid" value="<?php echo $this->control->tpl['company_id']; ?>">
52 <?php } ?>
53 
54 <table class="border allwidth">
55 
56 <tr>
57  <td><?php echo $langs->trans("Ref"); ?></td>
58  <td colspan="3"><?php echo $this->control->tpl['ref']; ?></td>
59 </tr>
60 
61 <tr>
62  <td width="15%" class="fieldrequired"><?php echo $langs->trans("Lastname").' / '.$langs->trans("Label"); ?></td>
63  <td><input name="lastname" type="text" size="30" maxlength="80" value="<?php echo $this->control->tpl['name']; ?>"></td>
64  <td width="20%"><?php echo $langs->trans("Firstname"); ?></td>
65  <td width="25%"><input name="firstname" type="text" size="30" maxlength="80" value="<?php echo $this->control->tpl['firstname']; ?>"></td>
66 </tr>
67 
68 <tr>
69  <td><?php echo $langs->trans("ThirdParty"); ?></td>
70  <td colspan="3"><?php echo $this->control->tpl['company']; ?></td>
71 </tr>
72 
73 <tr>
74  <td width="15%"><?php echo $langs->trans("UserTitle"); ?></td>
75  <td colspan="3"><?php echo $this->control->tpl['select_civility']; ?></td>
76 </tr>
77 
78 <tr>
79  <td><?php echo $langs->trans("PostOrFunction"); ?></td>
80  <td colspan="3"><input name="poste" type="text" size="50" maxlength="80" value="<?php echo $this->control->tpl['poste']; ?>"></td>
81 </tr>
82 
83 <tr>
84  <td><?php echo $langs->trans("Address"); ?></td>
85  <td colspan="3"><textarea class="flat" name="address" cols="70"><?php echo $this->control->tpl['address']; ?></textarea></td>
86 </tr>
87 
88 <tr>
89  <td><?php echo $langs->trans("Zip").' / '.$langs->trans("Town"); ?></td>
90  <td colspan="3"><?php echo $this->control->tpl['select_zip'].'&nbsp;'.$this->control->tpl['select_town']; ?></td>
91 </tr>
92 
93 <tr>
94  <td><?php echo $langs->trans("Country"); ?></td>
95  <td colspan="3"><?php echo $this->control->tpl['select_country'].$this->control->tpl['info_admin']; ?></td>
96 </tr>
97 
98 <tr>
99  <td><?php echo $langs->trans('State'); ?></td>
100  <td colspan="3"><?php echo $this->control->tpl['select_state']; ?></td>
101 </tr>
102 
103 <tr>
104  <td><?php echo $langs->trans("PhonePro"); ?></td>
105  <td><input name="phone_pro" type="text" size="18" maxlength="80" value="<?php echo $this->control->tpl['phone_pro']; ?>"></td>
106  <td><?php echo $langs->trans("PhonePerso"); ?></td>
107  <td><input name="phone_perso" type="text" size="18" maxlength="80" value="<?php echo $this->control->tpl['phone_perso']; ?>"></td>
108 </tr>
109 
110 <tr>
111  <td><?php echo $langs->trans("PhoneMobile"); ?></td>
112  <td><input name="phone_mobile" type="text" size="18" maxlength="80" value="<?php echo $this->control->tpl['phone_mobile']; ?>"></td>
113  <td><?php echo $langs->trans("Fax"); ?></td>
114  <td><input name="fax" type="text" size="18" maxlength="80" value="<?php echo $this->control->tpl['fax']; ?>"></td>
115 </tr>
116 
117 <tr>
118  <td><?php echo $langs->trans("Email"); ?></td>
119  <td><input name="email" type="text" size="50" maxlength="80" value="<?php echo $this->control->tpl['email']; ?>"></td>
120  <?php if ($this->control->tpl['nb_emailing']) { ?>
121  <td class="nowrap"><?php echo $langs->trans("NbOfEMailingsReceived"); ?></td>
122  <td><?php echo $this->control->tpl['nb_emailing']; ?></td>
123  <?php } else { ?>
124  <td colspan="2">&nbsp;</td>
125  <?php } ?>
126 </tr>
127 
128 <tr>
129  <td><?php echo $langs->trans("IM"); ?></td>
130  <td colspan="3"><input name="jabberid" type="text" size="50" maxlength="80" value="<?php echo $this->control->tpl['jabberid']; ?>"></td>
131 </tr>
132 
133 <tr>
134  <td><?php echo $langs->trans("ContactVisibility"); ?></td>
135  <td colspan="3"><?php echo $this->control->tpl['select_visibility']; ?></td>
136 </tr>
137 
138 <tr>
139  <td class="tdtop"><?php echo $langs->trans("Note"); ?></td>
140  <td colspan="3" valign="top"><textarea name="note" cols="70" rows="<?php echo ROWS_3; ?>"><?php echo $this->control->tpl['note']; ?></textarea></td>
141 </tr>
142 
143 <?php if (! empty($this->control->tpl['contact_element'])) { ?>
144 <?php foreach ($this->control->tpl['contact_element'] as $element) { ?>
145 <tr>
146  <td><?php echo $element['linked_element_label']; ?></td>
147  <td colspan="3"><?php echo $element['linked_element_value']; ?></td>
148 </tr>
149 <?php } } ?>
150 
151 <tr>
152  <td><?php echo $langs->trans("DolibarrLogin"); ?></td>
153  <td colspan="3"><?php echo $this->control->tpl['dolibarr_user']; ?></td>
154 </tr>
155 
156 <tr>
157  <td colspan="4" align="center">
158  <input type="submit" class="button" name="save" value="<?php echo $langs->trans("Save"); ?>">&nbsp;
159  <input type="submit" class="button" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>">
160  </td>
161 </tr>
162 
163 </table><br>
164 
165 </form>
166 
167 <!-- END PHP TEMPLATE -->
dol_htmloutput_errors($mesgstring='', $mesgarray='', $keepembedded=0)
Print formated error messages to output (Used to show messages on html output).
load_fiche_titre($titre, $morehtmlright='', $picto='title_generic.png', $pictoisfullpath=0, $id=0, $morecssontable='', $morehtmlcenter='')
Load a title with picto.
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition: repair.php:104
print
Draft customers invoices.
Definition: index.php:91
type
Definition: viewcat.php:283