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 EDIT.TPL -->
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, 'service');
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
53
54<table class="border allwidth">
55
56<tr>
57<td class="fieldrequired" width="20%"><?php echo $langs->trans("Ref"); ?></td>
58<td><input name="ref" size="40" maxlength="32" value="<?php echo $object->ref; ?>">
59</td></tr>
60
61<tr>
62<td class="fieldrequired"><?php echo $langs->trans("Label"); ?></td>
63<td><input name="label" size="40" value="<?php echo $object->label; ?>"></td>
64</tr>
65
66<tr>
67<td class="fieldrequired"><?php echo $langs->trans("Status").' ('.$langs->trans("Sell").')'; ?></td>
68<td><?php echo $form->selectarray('statut', $statutarray, $object->status); ?></td>
69</tr>
70
71<tr>
72<td class="fieldrequired"><?php echo $langs->trans("Status").' ('.$langs->trans("Buy").')'; ?></td>
73<td><?php echo $form->selectarray('statut_buy', $statutarray, $object->status_buy); ?></td>
74</tr>
75
76<tr><td><?php echo $langs->trans("Duration"); ?></td>
77<td><input name="duration_value" size="6" maxlength="5" value="<?php echo $object->duration_value; ?>"> &nbsp;
78<?php echo $object->duration_unit; ?>
79</td></tr>
80
81<tr><td class="tdtop"><?php echo $langs->trans("NoteNotVisibleOnBill"); ?></td><td>
82<?php echo $object->textarea_note; ?>
83</td></tr>
84</table>
85
86<br>
87
88<div align="center"><input type="submit" class="button button-save" value="<?php echo $langs->trans("Save"); ?>"> &nbsp; &nbsp;
89<input type="submit" class="button button-cancel" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>"></div>
90
91</form>
92
93<!-- 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