dolibarr 25.0.0-alpha
productattributevalueline_edit.tpl.php
1<?php
2/* Copyright (C) 2022 Open-Dsi <support@open-dsi.fr>
3 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
4 * Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 *
19 * Need to have the following variables defined:
20 * $object (invoice, order, ...)
21 * $conf
22 * $langs
23 * $seller, $buyer
24 * $dateSelector
25 * $forceall (0 by default, 1 for supplier invoices/orders)
26 * $senderissupplier (0 by default, 1 for supplier invoices/orders)
27 * $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax)
28 * $canchangeproduct (0 by default, 1 to allow to change the product if it is a predefined product)
29 */
30
45'
46@phan-var-force string $action
47@phan-var-force int $i
48@phan-var-force int $num
49@phan-var-force ProductAttributeValue $line
50';
51
52// Protection to avoid direct call of template
53if (empty($object) || !is_object($object)) {
54 print "Error, template page can't be called as URL";
55 exit(1);
56}
57
58// Define colspan for the button 'Add'
59$colspan = 3; // Column: col edit + col delete + move button
60
61print "<!-- BEGIN PHP TEMPLATE productattributevalueline_edit.tpl.php -->\n";
62
63$coldisplay = 0;
64?>
65<tr class="oddeven tredited">
66<?php if (getDolGlobalString('MAIN_VIEW_LINE_NUMBER')) { ?>
67 <td class="linecolnum center"><?php $coldisplay++; ?><?php echo($i + 1); ?></td>
68<?php }
69
70$coldisplay++;
71?>
72 <td class="nobottom linecolref">
73 <div id="line_<?php echo $line->id; ?>"></div>
74 <input type="hidden" name="lineid" value="<?php echo $line->id; ?>">
75
76 <?php $coldisplay++; ?>
77 <input type="text" name="line_ref" id="line_ref" class="flat" value="<?php echo(GETPOSTISSET("line_ref") ? GETPOST("line_ref", 'alpha', 2) : $line->ref); ?>">
78 <?php
79 if (is_object($hookmanager)) {
80 $parameters = array('line' => $line);
81 $reshook = $hookmanager->executeHooks('formEditProductOptions', $parameters, $object, $action);
82 if (!empty($hookmanager->resPrint)) {
83 print $hookmanager->resPrint;
84 }
85 }
86 ?>
87 </td>
88
89 <td class="nobottom linecolvalue"><?php $coldisplay++; ?>
90 <input type="text" name="line_value" id="line_value" class="flat" value="<?php echo(GETPOSTISSET("line_value") ? GETPOST("line_value", 'alpha', 2) : $line->value); ?>">
91 </td>
92
93 <!-- colspan for this td because it replace td for buttons+... -->
94 <td class="center valignmiddle" colspan="<?php echo $colspan; ?>"><?php $coldisplay += $colspan; ?>
95 <input type="submit" class="button buttongen marginbottomonly button-save" id="savelinebutton marginbottomonly" name="save" value="<?php echo $langs->trans("Save"); ?>"><br>
96 <input type="submit" class="button buttongen marginbottomonly button-cancel" id="cancellinebutton" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>">
97 </td>
98</tr>
99
100<!-- END PHP TEMPLATE productattributevalueline_edit.tpl.php -->
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
$propal type
'integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]',...
Definition propal.php:281
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:165