Merge branch 'ent-6271-mejoras-de-ui-en-setup' into 'develop'

Multicolumn setup for performance and visual settings

See merge request artica/pandorafms!3921
This commit is contained in:
Daniel Rodriguez 2021-04-06 17:47:39 +00:00
commit 0fc3cb8714
3 changed files with 976 additions and 937 deletions

View File

@ -44,6 +44,9 @@ if (! check_acl($config['id_user'], 0, 'PM')
return;
}
// Load needed resources.
ui_require_css_file('setup.multicolumn');
$update_config = get_parameter('update_config', 0);
if ($update_config == 1 && $config['history_db_enabled'] == 1) {
if (! isset($config['history_db_connection'])
@ -649,7 +652,7 @@ $table_other->data[16][1] = html_print_input_text(
echo '<form id="form_setup" method="post">';
echo '<fieldset>';
echo '<fieldset class="full-column">';
echo '<legend>'.__('Database maintenance status').' '.ui_print_help_icon('database_maintenance_status_tab', true).'</legend>';
html_print_table($table_status);
echo '</fieldset>';

View File

@ -23,14 +23,17 @@ if (! check_acl($config['id_user'], 0, 'PM') && ! is_user_admin($config['id_user
}
// FIX: this constant is declared to in godmode/reporting/reporting_builder.phps
// Constant with fonts directory
// Constant with fonts directory.
define('_MPDF_TTFONTPATH', $config['homedir'].'/include/fonts/');
require_once 'include/functions_post_process.php';
// Load enterprise extensions
// Load enterprise extensions.
enterprise_include('godmode/setup/setup_visuals.php');
// Load needed resources.
ui_require_css_file('setup.multicolumn');
/*
NOTICE FOR DEVELOPERS:
@ -116,10 +119,6 @@ if (enterprise_installed()) {
$row++;
}
echo '<fieldset>';
echo '<legend>'.__('Behaviour configuration').' '.ui_print_help_icon('behavoir_conf_tab', true).'</legend>';
html_print_table($table_behaviour);
echo '</fieldset>';
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
// STYLE CONFIGURATION
@ -567,10 +566,6 @@ $row++;
);
echo '<fieldset>';
echo '<legend>'.__('Style configuration').' '.ui_print_help_icon('style_conf_tab', true).'</legend>';
html_print_table($table_styles);
echo '</fieldset>';
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
// GIS CONFIGURATION
@ -610,10 +605,6 @@ $row++;
$table_gis->data[$row][1] .= '&nbsp;'.html_print_button(__('View'), 'gis_icon_preview', false, '', 'class="sub camera logo_preview"', true);
$row++;
echo '<fieldset>';
echo '<legend>'.__('GIS configuration').' '.ui_print_help_icon('gis_conf_tab', true).'</legend>';
html_print_table($table_gis);
echo '</fieldset>';
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
// FONT AND TEXT CONFIGURATION
@ -720,10 +711,6 @@ $row++;
);
$row++;
echo '<fieldset>';
echo '<legend>'.__('Font and Text configuration').' '.ui_print_help_icon('front_and_text_conf_tab', true).'</legend>';
html_print_table($table_font);
echo '</fieldset>';
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
// CHARS CONFIGURATION
@ -1045,10 +1032,6 @@ $row++;
);
$row++;
echo '<fieldset>';
echo '<legend>'.__('Charts configuration').' '.ui_print_help_icon('charts_conf_tab', true).'</legend>';
html_print_table($table_chars);
echo '</fieldset>';
// ----------------------------------------------------------------------
// ----------------------------------------------------------------------
// Visual Consoles
@ -1114,11 +1097,6 @@ $row++;
$table_vc->data[$row][1] = html_print_input_text('vc_line_thickness', (int) $config['vc_line_thickness'], '', 5, 5, true);
echo '<fieldset>';
echo '<legend>'.__('Visual consoles configuration').' '.ui_print_help_icon('visual_consoles_conf_tab', true).'</legend>';
html_print_table($table_vc);
echo '</fieldset>';
// ----------------------------------------------------------------------
// Services
// ----------------------------------------------------------------------
@ -1132,11 +1110,6 @@ $row++;
$table_ser->data['number'][0] = __('Number of favorite services to show in the menu');
$table_ser->data['number'][1] = "<input type ='number' value=".$config['ser_menu_items']." size='5' name='ser_menu_items' min='0' max='25'>";
echo '<fieldset>';
echo '<legend>'.__('Services configuration').' '.ui_print_help_icon('services_conf_tab', true).'</legend>';
html_print_table($table_ser);
echo '</fieldset>';
// ----------------------------------------------------------------------
// Reports
// ----------------------------------------------------------------------
@ -1285,10 +1258,6 @@ $row++;
true
);
echo '<fieldset>';
echo '<legend>'.__('Reports configuration ').ui_print_help_icon('reports_configuration_tab', true).'</legend>';
html_print_table($table_report);
echo '</fieldset>';
// ----------------------------------------------------------------------
// OTHER CONFIGURATION
@ -1526,25 +1495,8 @@ $row++;
$options_data_multiplier[1] = __('Use always 1000');
$options_data_multiplier[2] = __('Use always 1024');
$table_other->data[$row][1] = html_print_select($options_data_multiplier, 'use_data_multiplier', $config['use_data_multiplier'], '', '', 1, true, false, false);
echo '<fieldset>';
echo '<legend>'.__('Other configuration').' '.ui_print_help_icon('other_conf_tab', true).'</legend>';
html_print_table($table_other);
echo '</fieldset>';
echo '<div class="action-buttons" style="width: '.$table_other->width.'">';
html_print_submit_button(__('Update'), 'update_button', false, 'class="sub upd"');
echo '</div>';
echo '</form>';
ui_require_css_file('color-picker', 'include/styles/js/');
ui_require_jquery_file('colorpicker');
function load_fonts()
$table_other->data[$row][1] = html_print_select($options_data_multiplier, 'use_data_multiplier', $config['use_data_multiplier'], '', '', 1, true, false, false);function load_fonts()
{
global $config;
@ -1563,6 +1515,66 @@ $row++;
}
/*
*
* PAINT HTML.
*
*/
echo '<fieldset>';
echo '<legend>'.__('Behaviour configuration').' '.ui_print_help_icon('behavoir_conf_tab', true).'</legend>';
html_print_table($table_behaviour);
echo '</fieldset>';
echo '<fieldset>';
echo '<legend>'.__('GIS configuration').' '.ui_print_help_icon('gis_conf_tab', true).'</legend>';
html_print_table($table_gis);
echo '</fieldset>';
echo '<fieldset>';
echo '<legend>'.__('Style configuration').' '.ui_print_help_icon('style_conf_tab', true).'</legend>';
html_print_table($table_styles);
echo '</fieldset>';
echo '<fieldset>';
echo '<legend>'.__('Charts configuration').' '.ui_print_help_icon('charts_conf_tab', true).'</legend>';
html_print_table($table_chars);
echo '</fieldset>';
echo '<fieldset>';
echo '<legend>'.__('Font and Text configuration').' '.ui_print_help_icon('front_and_text_conf_tab', true).'</legend>';
html_print_table($table_font);
echo '</fieldset>';
echo '<fieldset>';
echo '<legend>'.__('Visual consoles configuration').' '.ui_print_help_icon('visual_consoles_conf_tab', true).'</legend>';
html_print_table($table_vc);
echo '</fieldset>';
echo '<fieldset>';
echo '<legend>'.__('Reports configuration ').ui_print_help_icon('reports_configuration_tab', true).'</legend>';
html_print_table($table_report);
echo '</fieldset>';
echo '<fieldset>';
echo '<legend>'.__('Services configuration').' '.ui_print_help_icon('services_conf_tab', true).'</legend>';
html_print_table($table_ser);
echo '</fieldset>';
echo '<fieldset>';
echo '<legend>'.__('Other configuration').' '.ui_print_help_icon('other_conf_tab', true).'</legend>';
html_print_table($table_other);
echo '</fieldset>';
echo '<div class="action-buttons" style="width: '.$table_other->width.'">';
html_print_submit_button(__('Update'), 'update_button', false, 'class="sub upd"');
echo '</div>';
echo '</form>';
ui_require_css_file('color-picker', 'include/styles/js/');
ui_require_jquery_file('colorpicker');
ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/');
ui_require_javascript_file('pandora');

View File

@ -0,0 +1,24 @@
#form_setup {
display: flex;
flex-direction: row;
justify-items: baseline;
justify-content: space-between;
flex-wrap: wrap;
}
fieldset {
background-color: #fff;
border: 1px solid #e2e2e2;
padding: 0.5em;
margin: 0px 1em;
margin-bottom: 20px;
position: relative;
border-radius: 5px;
flex: 1 1 700px;
}
.full-column {
width: 100%;
flex: none;
margin: 0 0 20px;
}