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 .= $this->printInput([
|
||||
'name' => 'id_group',
|
||||
'returnAllGroup' => false,
|
||||
'privilege' => 'PM',
|
||||
'type' => 'select_groups',
|
||||
'selected' => $this->task['id_group'],
|
||||
'return' => true,
|
||||
'class' => 'discovery_list_input',
|
||||
'size' => 9,
|
||||
'name' => 'id_group',
|
||||
'returnAllGroup' => false,
|
||||
'privilege' => 'PM',
|
||||
'type' => 'select_groups',
|
||||
'selected' => $this->task['id_group'],
|
||||
'return' => true,
|
||||
'class' => 'discovery_list_input',
|
||||
'size' => 9,
|
||||
'simple_multiple_options' => 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['delete_groups']) === true) ? $data['delete_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':
|
||||
|
|
|
@ -437,7 +437,8 @@ function html_print_select_groups(
|
|||
$strict_user=false,
|
||||
$delete_groups=false,
|
||||
$include_groups=false,
|
||||
$size=false
|
||||
$size=false,
|
||||
$simple_multiple_options=false
|
||||
) {
|
||||
global $config;
|
||||
|
||||
|
@ -483,7 +484,11 @@ function html_print_select_groups(
|
|||
$disabled,
|
||||
$style,
|
||||
$option_style,
|
||||
$size
|
||||
$size,
|
||||
false,
|
||||
'',
|
||||
false,
|
||||
$simple_multiple_options
|
||||
);
|
||||
|
||||
if ($return) {
|
||||
|
@ -531,7 +536,8 @@ function html_print_select(
|
|||
$size=false,
|
||||
$modal=false,
|
||||
$message='',
|
||||
$select_all=false
|
||||
$select_all=false,
|
||||
$simple_multiple_options=false
|
||||
) {
|
||||
$output = "\n";
|
||||
|
||||
|
@ -551,11 +557,21 @@ function html_print_select(
|
|||
$attributes .= ' onchange="'.$script.'"';
|
||||
}
|
||||
|
||||
if ($size !== false)
|
||||
$attributes .= ' size="'.$size.'"';
|
||||
if (!empty($multiple)) {
|
||||
if ($size !== false) {
|
||||
$attributes .= ' multiple="multiple" size="'.$size.'"';
|
||||
} else {
|
||||
$attributes .= ' multiple="multiple" size="10"';
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($multiple))
|
||||
$attributes .= ' multiple="multiple"';
|
||||
if ($simple_multiple_options === true) {
|
||||
if ($size !== false) {
|
||||
$attributes .= ' size="'.$size.'"';
|
||||
} else {
|
||||
$attributes .= ' size="10"';
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($class)) {
|
||||
$attributes .= ' class="'.$class.'"';
|
||||
|
|
Loading…
Reference in New Issue