Skip to content

Commit cca679c

Browse files
committed
Add property parent
1 parent 70f2836 commit cca679c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

htdocs/core/class/html.form.class.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9585,6 +9585,7 @@ public static function selectarray($htmlname, $array, $id = '', $show_empty = 0,
95859585
}
95869586
$out .= '<option value="' . $key . '"';
95879587
$out .= $style . $disabled;
9588+
$out .= is_array($tmpvalue) && !empty($tmpvalue['parent']) ? ' parent="' . dolPrintHTMLForAttribute($tmpvalue['parent']) . '"' : '';
95889589
if (is_array($id)) {
95899590
if (in_array($key, $id) && !$disabled) {
95909591
$out .= ' selected'; // To preselect a value
@@ -9926,6 +9927,7 @@ public static function multiselectarray($htmlname, $array, $selected = array(),
99269927
if (is_array($selected) && !empty($selected) && in_array((string) $tmpkey, $selected) && ((string) $tmpkey != '')) {
99279928
$out .= ' selected';
99289929
}
9930+
$out .= is_array($value) && array_key_exists('parent', $value) && !empty($value['parent']) ? ' parent="' . dolPrintHTMLForAttribute($value['parent']) . '"' : '';
99299931
if ($tmpdisabled) {
99309932
$out .= ' disabled="disabled"';
99319933
}

0 commit comments

Comments
 (0)