lint changes

This commit is contained in:
alejandro-campos 2019-05-17 14:20:01 +02:00
parent 13b32003b3
commit a0b7164d9f
3 changed files with 61 additions and 8 deletions

View File

@ -608,6 +608,8 @@ class HostDevices extends Wizard
$interv_manual = 1;
}
$form['rows'][0]['new_form_block'] = true;
$form['rows'][0]['columns'][0] = [
'width' => '30%',
'style' => 'padding: 9px;',
@ -799,7 +801,6 @@ class HostDevices extends Wizard
],
];
// Hidden, page.
$form['inputs'][] = [
'arguments' => [
'name' => 'page',
@ -813,7 +814,6 @@ class HostDevices extends Wizard
'extra' => '<p><h3>Please, configure task <b>'.io_safe_output($this->task['name']).'</b></h3></p>',
];
// Input: Module template.
$form['inputs'][] = [
'label' => __('Module template'),
'arguments' => [

View File

@ -567,7 +567,7 @@ class Wizard
],
];
$this->printForm($form);
$this->printFormAsList($form);
}
@ -603,14 +603,55 @@ class Wizard
$output .= '</ul></li>';
} else {
if ($input['arguments']['type'] != 'hidden') {
$output .= '<div class="edit_discovery_input">';
if ($input['arguments']['inline'] != 'true') {
$output .= '<div class="edit_discovery_input">';
} else {
$output .= '<div style="display: flex; margin-bottom: 25px;">';
if (!isset($input['extra'])) {
$output .= '<div style="width: 50%;">';
}
if (isset($input['extra'])) {
$output .= '<div style="width: 50%; display: flex;">';
}
}
if ($input['arguments']['inline'] == 'true' && isset($input['extra'])) {
$output .= '<div style="width: 50%">';
}
$output .= '<div class="label_select">';
$output .= $input['label'];
$output .= '</div>';
if ($input['arguments']['type'] == 'text') {
if ($input['arguments']['inline'] == 'true' && isset($input['extra'])) {
$output .= '</div>';
}
if ($input['arguments']['inline'] == 'true' && !isset($input['extra'])) {
$output .= '</div>';
}
if ($input['arguments']['type'] == 'text' || $input['arguments']['type'] == 'text_extended') {
$output .= '<div class="discovery_text_input">';
$output .= $this->printInput($input['arguments']);
$output .= '</div>';
} else if ($input['arguments']['inline'] == 'true') {
$output .= '<div style="width: 50%;">';
if (isset($input['extra'])) {
$output .= '<div style="float: center;">';
} else {
$output .= '<div style="float: right;">';
}
$output .= $this->printInput($input['arguments']);
$output .= '</div>';
$output .= '</div>';
if (isset($input['extra'])) {
$output .= '</div>';
}
} else {
$output .= $this->printInput($input['arguments']);
}
@ -725,9 +766,21 @@ class Wizard
$output_submit = '';
$output = '';
$output .= '<div class="white_box">';
$first_block_printed = false;
foreach ($rows as $row) {
if ($row['new_form_block'] == true) {
if ($first_block_printed === true) {
// If first form block has been placed, then close it before starting a new one.
$output .= '</div>';
$output .= '<div class="white_box" style="margin-top: 30px;">';
} else {
$output .= '<div class="white_box">';
}
$first_block_printed = true;
}
$output .= '<div class="edit_discovery_info" style="'.$row['style'].'">';
foreach ($row['columns'] as $column) {

View File

@ -230,8 +230,8 @@ li > input[type="password"],
height: 100px;
max-height: 100px;
max-width: 100%;
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
resize: none;
}