change way to print discovery simple multiple inputs
Former-commit-id: 845171053b2002d036f0f8992a2aacad4ec0a561
This commit is contained in:
parent
92da84c47f
commit
7433d52130
|
@ -677,14 +677,15 @@ class HostDevices extends Wizard
|
||||||
$group_select = '<div class="label_select"><label>'.__('Group').':</label></div>';
|
$group_select = '<div class="label_select"><label>'.__('Group').':</label></div>';
|
||||||
|
|
||||||
$group_select .= $this->printInput([
|
$group_select .= $this->printInput([
|
||||||
'name' => 'id_group',
|
'name' => 'id_group',
|
||||||
'returnAllGroup' => false,
|
'returnAllGroup' => false,
|
||||||
'privilege' => 'PM',
|
'privilege' => 'PM',
|
||||||
'type' => 'select_groups',
|
'type' => 'select_groups',
|
||||||
'selected' => $this->task['id_group'],
|
'selected' => $this->task['id_group'],
|
||||||
'return' => true,
|
'return' => true,
|
||||||
'class' => 'discovery_list_input',
|
'class' => 'discovery_list_input',
|
||||||
'size' => 9,
|
'size' => 9,
|
||||||
|
'simple_multiple_options' => true,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (isset($this->task['id_rt']) === true) {
|
if (isset($this->task['id_rt']) === true) {
|
||||||
|
|
|
@ -480,7 +480,8 @@ class Wizard
|
||||||
((isset($data['strict_user']) === true) ? $data['strict_user'] : false),
|
((isset($data['strict_user']) === true) ? $data['strict_user'] : false),
|
||||||
((isset($data['delete_groups']) === true) ? $data['delete_groups'] : false),
|
((isset($data['delete_groups']) === true) ? $data['delete_groups'] : false),
|
||||||
((isset($data['include_groups']) === true) ? $data['include_groups'] : false),
|
((isset($data['include_groups']) === true) ? $data['include_groups'] : false),
|
||||||
((isset($data['size']) === true) ? $data['size'] : false)
|
((isset($data['size']) === true) ? $data['size'] : false),
|
||||||
|
((isset($data['simple_multiple_options']) === true) ? $data['simple_multiple_options'] : false)
|
||||||
);
|
);
|
||||||
|
|
||||||
case 'submit':
|
case 'submit':
|
||||||
|
|
|
@ -437,7 +437,8 @@ function html_print_select_groups(
|
||||||
$strict_user=false,
|
$strict_user=false,
|
||||||
$delete_groups=false,
|
$delete_groups=false,
|
||||||
$include_groups=false,
|
$include_groups=false,
|
||||||
$size=false
|
$size=false,
|
||||||
|
$simple_multiple_options=false
|
||||||
) {
|
) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
@ -483,7 +484,11 @@ function html_print_select_groups(
|
||||||
$disabled,
|
$disabled,
|
||||||
$style,
|
$style,
|
||||||
$option_style,
|
$option_style,
|
||||||
$size
|
$size,
|
||||||
|
false,
|
||||||
|
'',
|
||||||
|
false,
|
||||||
|
$simple_multiple_options
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($return) {
|
if ($return) {
|
||||||
|
@ -531,7 +536,8 @@ function html_print_select(
|
||||||
$size=false,
|
$size=false,
|
||||||
$modal=false,
|
$modal=false,
|
||||||
$message='',
|
$message='',
|
||||||
$select_all=false
|
$select_all=false,
|
||||||
|
$simple_multiple_options=false
|
||||||
) {
|
) {
|
||||||
$output = "\n";
|
$output = "\n";
|
||||||
|
|
||||||
|
@ -551,11 +557,21 @@ function html_print_select(
|
||||||
$attributes .= ' onchange="'.$script.'"';
|
$attributes .= ' onchange="'.$script.'"';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($size !== false)
|
if (!empty($multiple)) {
|
||||||
$attributes .= ' size="'.$size.'"';
|
if ($size !== false) {
|
||||||
|
$attributes .= ' multiple="multiple" size="'.$size.'"';
|
||||||
|
} else {
|
||||||
|
$attributes .= ' multiple="multiple" size="10"';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($multiple))
|
if ($simple_multiple_options === true) {
|
||||||
$attributes .= ' multiple="multiple"';
|
if ($size !== false) {
|
||||||
|
$attributes .= ' size="'.$size.'"';
|
||||||
|
} else {
|
||||||
|
$attributes .= ' size="10"';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($class)) {
|
if (!empty($class)) {
|
||||||
$attributes .= ' class="'.$class.'"';
|
$attributes .= ' class="'.$class.'"';
|
||||||
|
|
Loading…
Reference in New Issue