1<?php
2/* Copyright (C) 2010-2018 Regis Houssin <regis.houssin@inodbox.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 <https://www.gnu.org/licenses/>.
16 */
17
18// Protection to avoid direct call of template
19if (empty($conf) || !is_object($conf))
20{
21	print "Error, template page can't be called as URL";
22	exit;
23}
24
25
26$object = $GLOBALS['object'];
27
28$statutarray = array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell"));
29?>
30
31<!-- BEGIN PHP TEMPLATE EDIT.TPL -->
32
33<?php
34$head = product_prepare_head($object);
35$titre = $langs->trans("CardProduct".$object->type);
36print dol_get_fiche_head($head, 'card', $titre, 0, 'service');
37
38dol_htmloutput_errors($object->error, $object->errors);
39?>
40
41<form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post">
42<input type="hidden" name="token" value="<?php echo newToken(); ?>">
43<input type="hidden" name="action" value="update">
44<input type="hidden" name="id" value="<?php echo $object->id; ?>">
45<input type="hidden" name="canvas" value="<?php echo $object->canvas; ?>">
46
47
48<table class="border allwidth">
49
50<tr>
51<td class="fieldrequired" width="20%"><?php echo $langs->trans("Ref"); ?></td>
52<td><input name="ref" size="40" maxlength="32" value="<?php echo $object->ref; ?>">
53</td></tr>
54
55<tr>
56<td class="fieldrequired"><?php echo $langs->trans("Label"); ?></td>
57<td><input name="label" size="40" value="<?php echo $object->label; ?>"></td>
58</tr>
59
60<tr>
61<td class="fieldrequired"><?php echo $langs->trans("Status").' ('.$langs->trans("Sell").')'; ?></td>
62<td><?php echo $form->selectarray('statut', $statutarray, $object->status); ?></td>
63</tr>
64
65<tr>
66<td class="fieldrequired"><?php echo $langs->trans("Status").' ('.$langs->trans("Buy").')'; ?></td>
67<td><?php echo $form->selectarray('statut_buy', $statutarray, $object->status_buy); ?></td>
68</tr>
69
70<tr><td><?php echo $langs->trans("Duration"); ?></td>
71<td><input name="duration_value" size="6" maxlength="5" value="<?php echo $object->duration_value; ?>"> &nbsp;
72<?php echo $object->duration_unit; ?>
73</td></tr>
74
75<tr><td class="tdtop"><?php echo $langs->trans("NoteNotVisibleOnBill"); ?></td><td>
76<?php echo $object->textarea_note; ?>
77</td></tr>
78</table>
79
80<br>
81
82<div align="center"><input type="submit" class="button button-save" value="<?php echo $langs->trans("Save"); ?>"> &nbsp; &nbsp;
83<input type="submit" class="button button-cancel" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>"></div>
84
85</form>
86
87<!-- END PHP TEMPLATE -->
88