dolibarr 21.0.0-beta
card_edit.tpl.php
1<?php
2/* Copyright (C) 2010-2018 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 */
24// Protection to avoid direct call of template
25if (empty($conf) || !is_object($conf)) {
26 print "Error, template page can't be called as URL";
27 exit(1);
28}
29
30
31$object = $GLOBALS['object'];
34$statutarray = array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell"));
35?>
36
37<!-- BEGIN PHP TEMPLATE product/canvas/product/tpl/card_edit.tpl.php-->
38
39<?php
40$head = product_prepare_head($object);
41$titre = $langs->trans("CardProduct".$object->type);
42print dol_get_fiche_head($head, 'card', $titre, 0, 'product');
43
45?>
46
47<form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post">
48<input type="hidden" name="token" value="<?php echo newToken(); ?>">
49<input type="hidden" name="action" value="update">
50<input type="hidden" name="id" value="<?php echo $object->id; ?>">
51<input type="hidden" name="canvas" value="<?php echo $object->canvas; ?>">
52<?php if (!isModEnabled('stock')) { ?>
53<input name="seuil_stock_alerte" type="hidden" value="0">
54<?php } ?>
55
56
57<table class="border allwidth">
58
59<tr>
60<td class="fieldrequired" width="20%"><?php echo $langs->trans("Ref"); ?></td>
61<td><input name="ref" size="40" maxlength="32" value="<?php echo $object->ref; ?>">
62</td></tr>
63
64<tr>
65<td class="fieldrequired"><?php echo $langs->trans("Label"); ?></td>
66<td><input name="label" size="40" value="<?php echo $object->label; ?>"></td>
67</tr>
68
69<tr>
70<td class="fieldrequired"><?php echo $langs->trans("Status").' ('.$langs->trans("Sell").')'; ?></td>
71<td><?php echo $form->selectarray('statut', $statutarray, $object->status); ?></td>
72</tr>
73
74<tr>
75<td class="fieldrequired"><?php echo $langs->trans("Status").' ('.$langs->trans("Buy").')'; ?></td>
76<td><?php echo $form->selectarray('statut_buy', $statutarray, $object->status_buy); ?></td>
77</tr>
78
79<?php if (isModEnabled('stock')) { ?>
80<tr><td><?php echo $langs->trans("StockLimit"); ?></td><td>
81<input name="seuil_stock_alerte" size="4" value="<?php echo $object->seuil_stock_alerte; ?>">
82</td></tr>
83<?php } ?>
84
85<tr><td><?php echo $langs->trans("Nature"); ?></td><td>
86<?php echo $object->finished; ?>
87</td></tr>
88
89<tr><td><?php echo $langs->trans("Weight"); ?></td><td>
90<input name="weight" size="4" value="<?php echo $object->weight; ?>">
91<?php echo $object->weight_units; ?>
92</td></tr>
93
94<tr><td><?php echo $langs->trans("Length"); ?></td><td>
95<input name="size" size="4" value="<?php echo $object->length; ?>">
96<?php echo $object->length_units; ?>
97</td></tr>
98
99<tr><td><?php echo $langs->trans("Surface"); ?></td><td>
100<input name="surface" size="4" value="<?php echo $object->surface; ?>">
101<?php echo $object->surface_units; ?>
102</td></tr>
103
104<tr><td><?php echo $langs->trans("Volume"); ?></td><td>
105<input name="volume" size="4" value="<?php echo $object->volume; ?>">
106<?php echo $object->volume_units; ?>
107</td></tr>
108
109<tr><td class="tdtop"><?php echo $langs->trans("NoteNotVisibleOnBill"); ?></td><td>
110<?php echo $object->textarea_note; ?>
111</td></tr>
112</table>
113
114<br>
115
116<div align="center"><input type="submit" class="button button-save" value="<?php echo $langs->trans("Save"); ?>"> &nbsp; &nbsp;
117<input type="submit" class="button button-cancel" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>"></div>
118
119</form>
120
121<!-- END PHP TEMPLATE -->
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:66
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.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
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:149
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:152