dolibarr 20.0.0
card_edit.tpl.php
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 print "Error, template page can't be called as URL";
21 exit(1);
22}
23
24
25$object = $GLOBALS['object'];
26
27$statutarray = array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell"));
28?>
29
30<!-- BEGIN PHP TEMPLATE product/canvas/product/tpl/card_edit.tpl.php-->
31
32<?php
33$head = product_prepare_head($object);
34$titre = $langs->trans("CardProduct".$object->type);
35print dol_get_fiche_head($head, 'card', $titre, 0, 'product');
36
38?>
39
40<form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post">
41<input type="hidden" name="token" value="<?php echo newToken(); ?>">
42<input type="hidden" name="action" value="update">
43<input type="hidden" name="id" value="<?php echo $object->id; ?>">
44<input type="hidden" name="canvas" value="<?php echo $object->canvas; ?>">
45<?php if (!isModEnabled('stock')) { ?>
46<input name="seuil_stock_alerte" type="hidden" value="0">
47<?php } ?>
48
49
50<table class="border allwidth">
51
52<tr>
53<td class="fieldrequired" width="20%"><?php echo $langs->trans("Ref"); ?></td>
54<td><input name="ref" size="40" maxlength="32" value="<?php echo $object->ref; ?>">
55</td></tr>
56
57<tr>
58<td class="fieldrequired"><?php echo $langs->trans("Label"); ?></td>
59<td><input name="label" size="40" value="<?php echo $object->label; ?>"></td>
60</tr>
61
62<tr>
63<td class="fieldrequired"><?php echo $langs->trans("Status").' ('.$langs->trans("Sell").')'; ?></td>
64<td><?php echo $form->selectarray('statut', $statutarray, $object->status); ?></td>
65</tr>
66
67<tr>
68<td class="fieldrequired"><?php echo $langs->trans("Status").' ('.$langs->trans("Buy").')'; ?></td>
69<td><?php echo $form->selectarray('statut_buy', $statutarray, $object->status_buy); ?></td>
70</tr>
71
72<?php if (isModEnabled('stock')) { ?>
73<tr><td><?php echo $langs->trans("StockLimit"); ?></td><td>
74<input name="seuil_stock_alerte" size="4" value="<?php echo $object->seuil_stock_alerte; ?>">
75</td></tr>
76<?php } ?>
77
78<tr><td><?php echo $langs->trans("Nature"); ?></td><td>
79<?php echo $object->finished; ?>
80</td></tr>
81
82<tr><td><?php echo $langs->trans("Weight"); ?></td><td>
83<input name="weight" size="4" value="<?php echo $object->weight; ?>">
84<?php echo $object->weight_units; ?>
85</td></tr>
86
87<tr><td><?php echo $langs->trans("Length"); ?></td><td>
88<input name="size" size="4" value="<?php echo $object->length; ?>">
89<?php echo $object->length_units; ?>
90</td></tr>
91
92<tr><td><?php echo $langs->trans("Surface"); ?></td><td>
93<input name="surface" size="4" value="<?php echo $object->surface; ?>">
94<?php echo $object->surface_units; ?>
95</td></tr>
96
97<tr><td><?php echo $langs->trans("Volume"); ?></td><td>
98<input name="volume" size="4" value="<?php echo $object->volume; ?>">
99<?php echo $object->volume_units; ?>
100</td></tr>
101
102<tr><td class="tdtop"><?php echo $langs->trans("NoteNotVisibleOnBill"); ?></td><td>
103<?php echo $object->textarea_note; ?>
104</td></tr>
105</table>
106
107<br>
108
109<div align="center"><input type="submit" class="button button-save" value="<?php echo $langs->trans("Save"); ?>"> &nbsp; &nbsp;
110<input type="submit" class="button button-cancel" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>"></div>
111
112</form>
113
114<!-- END PHP TEMPLATE -->
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:58
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
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.
product_prepare_head($object)
Prepare array with list of tabs.
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type
Definition repair.php:139
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:142