Merge branch 'ent-3120-Cambio-de-radio-buttons-yes-no-por-checkbox-2-parte' into 'develop'
Changed radio buttons by toogle switch checkbox See merge request artica/pandorafms!2130 Former-commit-id: ab3aa0dbe0266fccba771fb3aa36ca3fb7d489ac
This commit is contained in:
commit
80407881dc
|
@ -125,22 +125,19 @@ $table_other->data[3][0] = __('Default hours for event view');
|
|||
$table_other->data[3][1] = html_print_input_text('event_view_hr', $config['event_view_hr'], '', 5, 5, true);
|
||||
|
||||
$table_other->data[5][0] = __('Use realtime statistics');
|
||||
$table_other->data[5][1] = __('Yes').' '.html_print_radio_button('realtimestats', 1, '', $config['realtimestats'], true).' ';
|
||||
$table_other->data[5][1] .= __('No').' '.html_print_radio_button('realtimestats', 0, '', $config['realtimestats'], true);
|
||||
$table_other->data[5][1] = html_print_checkbox_toogle_switch('realtimestats', 1, $config['realtimestats'], true);
|
||||
|
||||
$table_other->data[6][0] = __('Batch statistics period (secs)').ui_print_help_tip(__('If realtime statistics are disabled, statistics interval resfresh will be set here.'), true);
|
||||
$table_other->data[6][1] = html_print_input_text('stats_interval', $config['stats_interval'], '', 5, 5, true);
|
||||
|
||||
$table_other->data[7][0] = __('Use agent access graph').ui_print_help_icon('agent_access', true);
|
||||
$table_other->data[7][1] = __('Yes').' '.html_print_radio_button('agentaccess', 1, '', $config['agentaccess'], true).' ';
|
||||
$table_other->data[7][1] .= __('No').' '.html_print_radio_button('agentaccess', 0, '', $config['agentaccess'], true);
|
||||
$table_other->data[7][1] = html_print_checkbox_toogle_switch('agentaccess', 1, $config['agentaccess'], true);
|
||||
|
||||
$table_other->data[8][0] = __('Max. recommended number of files in attachment directory').ui_print_help_tip(__('This number is the maximum number of files in attachment directory. If this number is reached then a warning message will appear in the header notification space.'), true);
|
||||
$table_other->data[8][1] = html_print_input_text('num_files_attachment', $config['num_files_attachment'], '', 5, 5, true);
|
||||
|
||||
$table_other->data[9][0] = __('Delete not init modules');
|
||||
$table_other->data[9][1] = __('Yes').' '.html_print_radio_button('delete_notinit', 1, '', $config['delete_notinit'], true).' ';
|
||||
$table_other->data[9][1] .= __('No').' '.html_print_radio_button('delete_notinit', 0, '', $config['delete_notinit'], true);
|
||||
$table_other->data[9][1] = html_print_checkbox_toogle_switch('delete_notinit', 1, $config['delete_notinit'], true);
|
||||
|
||||
$table_other->data[10][0] = __('Big Operation Step to purge old data').ui_print_help_tip(__('The number of blocks that a time interval is split into. A bigger value means bigger blocks, which is faster but heavier on the database. Default is 100.'), true);
|
||||
$table_other->data[10][1] = html_print_input_text('big_operation_step_datos_purge', $config['big_operation_step_datos_purge'], '', 5, 5, true);
|
||||
|
|
|
@ -43,17 +43,15 @@ if (is_ajax()) {
|
|||
if ($type_auth != 'mysql') {
|
||||
// Fallback to local authentication
|
||||
$row = [];
|
||||
$row['name'] = __('Fallback to local authentication').ui_print_help_tip(__('Enable this option if you want to fallback to local authentication when remote (ldap etc...) authentication failed. Only available when \'Save password\' is enabled.'), true);
|
||||
$row['control'] = __('Yes').' '.html_print_radio_button('fallback_local_auth', 1, '', $config['fallback_local_auth'], true).' ';
|
||||
$row['control'] .= __('No').' '.html_print_radio_button('fallback_local_auth', 0, '', $config['fallback_local_auth'], true);
|
||||
$row['name'] = __('Fallback to local authentication').ui_print_help_tip(__('Enable this option if you want to fallback to local authentication when remote (ldap etc...) authentication failed.'), true);
|
||||
$row['control'] = html_print_checkbox_toogle_switch('fallback_local_auth', 1, $config['fallback_local_auth'], true);
|
||||
$table->data['fallback_local_auth'] = $row;
|
||||
|
||||
if (enterprise_installed()) {
|
||||
// Autocreate remote users
|
||||
$row = [];
|
||||
$row['name'] = __('Autocreate remote users');
|
||||
$row['control'] = __('Yes').' '.html_print_radio_button_extended('autocreate_remote_users', 1, '', $config['autocreate_remote_users'], false, '', '', true).' ';
|
||||
$row['control'] .= __('No').' '.html_print_radio_button_extended('autocreate_remote_users', 0, '', $config['autocreate_remote_users'], false, '', '', true);
|
||||
$row['control'] = html_print_checkbox_toogle_switch_extended('autocreate_remote_users', 1, $config['autocreate_remote_users'], false, '', '', true).' ';
|
||||
$table->data['autocreate_remote_users'] = $row;
|
||||
|
||||
add_enterprise_auth_autocreate_profiles($table, $type_auth);
|
||||
|
@ -91,8 +89,7 @@ if (is_ajax()) {
|
|||
// Start TLS
|
||||
$row = [];
|
||||
$row['name'] = __('Start TLS');
|
||||
$row['control'] = __('Yes').' '.html_print_radio_button('ldap_start_tls', 1, '', $config['ldap_start_tls'], true).' ';
|
||||
$row['control'] .= __('No').' '.html_print_radio_button('ldap_start_tls', 0, '', $config['ldap_start_tls'], true);
|
||||
$row['control'] = html_print_checkbox_toogle_switch('ldap_start_tls', 1, $config['ldap_start_tls'], true);
|
||||
$table->data['ldap_start_tls'] = $row;
|
||||
|
||||
// Base DN
|
||||
|
@ -137,11 +134,7 @@ if (is_ajax()) {
|
|||
set_unless_defined($config['double_auth_enabled'], false);
|
||||
$row = [];
|
||||
$row['name'] = __('Double authentication').ui_print_help_tip(__('If this option is enabled, the users can use double authentication with their accounts'), true);
|
||||
$row['control'] = __('Yes').' ';
|
||||
$row['control'] .= html_print_radio_button('double_auth_enabled', 1, '', $config['double_auth_enabled'], true);
|
||||
$row['control'] .= ' ';
|
||||
$row['control'] .= __('No').' ';
|
||||
$row['control'] .= html_print_radio_button('double_auth_enabled', 0, '', $config['double_auth_enabled'], true);
|
||||
$row['control'] = html_print_checkbox_toogle_switch('double_auth_enabled', 1, $config['double_auth_enabled'], true);
|
||||
$table->data['double_auth_enabled'] = $row;
|
||||
|
||||
// Session timeout
|
||||
|
|
|
@ -48,8 +48,8 @@ $table_enable->style['name'] = 'font-weight: bold';
|
|||
// Enable eHorus
|
||||
$row = [];
|
||||
$row['name'] = __('Enable eHorus');
|
||||
$row['control'] = __('Yes').' '.html_print_radio_button('ehorus_enabled', 1, '', $config['ehorus_enabled'], true).' ';
|
||||
$row['control'] .= __('No').' '.html_print_radio_button('ehorus_enabled', 0, '', $config['ehorus_enabled'], true);
|
||||
$row['control'] = __('Enabled').' '.html_print_radio_button('ehorus_enabled', 1, '', $config['ehorus_enabled'], true).' ';
|
||||
$row['control'] .= __('Disabled').' '.html_print_radio_button('ehorus_enabled', 0, '', $config['ehorus_enabled'], true);
|
||||
$row['button'] = html_print_submit_button(__('Update'), 'update_button', false, 'class="sub upd"', true);
|
||||
$table_enable->data['ehorus_enabled'] = $row;
|
||||
|
||||
|
|
|
@ -82,16 +82,17 @@ $sources['sql'] = __('Database');
|
|||
$table->data[9][1] = html_print_select($sources, 'timesource', $config['timesource'], '', '', '', true);
|
||||
|
||||
$table->data[10][0] = __('Automatic check for updates');
|
||||
$table->data[10][1] = __('Yes').' '.html_print_radio_button('autoupdate', 1, '', $config['autoupdate'], true).' ';
|
||||
$table->data[10][1] .= __('No').' '.html_print_radio_button('autoupdate', 0, '', $config['autoupdate'], true);
|
||||
$table->data[10][1] = html_print_checkbox_toogle_switch('autoupdate', 1, $config['autoupdate'], true);
|
||||
|
||||
echo "<div id='dialog' title='".__('Enforce https Information')."' style='display:none;'>";
|
||||
echo "<p style='text-align: center;'>".__('If SSL is not properly configured you will lose access to ').get_product_name().__(' Console').'</p>';
|
||||
echo '</div>';
|
||||
|
||||
$table->data[11][0] = __('Enforce https');
|
||||
$table->data[11][1] = __('Yes').' '.html_print_radio_button_extended('https', 1, '', $config['https'], false, "if (! confirm ('".__('If SSL is not properly configured you will lose access to %s Console. Do you want to continue?', get_product_name())."')) return false", '', true).' ';
|
||||
$table->data[11][1] .= __('No').' '.html_print_radio_button('https', 0, '', $config['https'], true);
|
||||
$table->data[11][1] = html_print_checkbox_toogle_switch_extended('https', 1, $config['https'], false, '', '', true);
|
||||
|
||||
$table->data[12][0] = __('Use cert of SSL');
|
||||
$table->data[12][1] = __('Yes').' '.html_print_radio_button_extended('use_cert', 1, '', $config['use_cert'], false, '', '', true).' ';
|
||||
$table->data[12][1] .= __('No').' '.html_print_radio_button('use_cert', 0, '', $config['use_cert'], true);
|
||||
$table->data[12][1] = html_print_checkbox_toogle_switch_extended('use_cert', 1, $config['use_cert'], false, '', '', true);
|
||||
|
||||
$table->rowstyle[13] = 'display: none;';
|
||||
$table->data[13][0] = __('Path of SSL Cert.').ui_print_help_tip(__('Path where you put your cert and name of this cert. Remember your cert only in .pem extension.'), true);
|
||||
|
@ -113,8 +114,7 @@ $table->data[16][0] = __('API password').ui_print_help_tip(__('Please be careful
|
|||
$table->data[16][1] = html_print_input_password('api_password', io_output_password($config['api_password']), '', 25, 255, true);
|
||||
|
||||
$table->data[17][0] = __('Enable GIS features');
|
||||
$table->data[17][1] = __('Yes').' '.html_print_radio_button('activate_gis', 1, '', $config['activate_gis'], true).' ';
|
||||
$table->data[17][1] .= __('No').' '.html_print_radio_button('activate_gis', 0, '', $config['activate_gis'], true);
|
||||
$table->data[17][1] = html_print_checkbox_toogle_switch('activate_gis', 1, $config['activate_gis'], true);
|
||||
|
||||
$table->data[19][0] = __('Enable Netflow');
|
||||
$rbt_disabled = false;
|
||||
|
@ -123,8 +123,8 @@ if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
|
|||
$table->data[19][0] .= ui_print_help_tip(__('Not supported in Windows systems'), true);
|
||||
}
|
||||
|
||||
$table->data[19][1] = __('Yes').' '.html_print_radio_button_extended('activate_netflow', 1, '', $config['activate_netflow'], $rbt_disabled, '', '', true).' ';
|
||||
$table->data[19][1] .= __('No').' '.html_print_radio_button_extended('activate_netflow', 0, '', $config['activate_netflow'], $rbt_disabled, '', '', true);
|
||||
$table->data[19][1] = html_print_checkbox_toogle_switch_extended('activate_netflow', 1, $config['activate_netflow'], $rbt_disabled, '', '', true);
|
||||
|
||||
|
||||
$zone_name = [
|
||||
'Africa' => __('Africa'),
|
||||
|
@ -202,18 +202,15 @@ $table->data[28][1] = html_print_input_text('public_url', $config['public_url'],
|
|||
|
||||
$table->data[29][0] = __('Referer security');
|
||||
$table->data[29][0] .= ui_print_help_tip(__("If enabled, actively checks if the user comes from %s's URL", get_product_name()), true);
|
||||
$table->data[29][1] = __('Yes').' '.html_print_radio_button('referer_security', 1, '', $config['referer_security'], true).' ';
|
||||
$table->data[29][1] .= __('No').' '.html_print_radio_button('referer_security', 0, '', $config['referer_security'], true);
|
||||
$table->data[29][1] = html_print_checkbox_toogle_switch('referer_security', 1, $config['referer_security'], true);
|
||||
|
||||
$table->data[30][0] = __('Event storm protection');
|
||||
$table->data[30][0] .= ui_print_help_tip(__('If set to yes no events or alerts will be generated, but agents will continue receiving data.'), true);
|
||||
$table->data[30][1] = __('Yes').' '.html_print_radio_button('event_storm_protection', 1, '', $config['event_storm_protection'], true).' ';
|
||||
$table->data[30][1] .= __('No').' '.html_print_radio_button('event_storm_protection', 0, '', $config['event_storm_protection'], true);
|
||||
$table->data[30][1] = html_print_checkbox_toogle_switch('event_storm_protection', 1, $config['event_storm_protection'], true);
|
||||
|
||||
|
||||
$table->data[31][0] = __('Command Snapshot').ui_print_help_tip(__('The string modules with several lines show as command output'), true);
|
||||
$table->data[31][1] = __('Yes').' '.html_print_radio_button('command_snapshot', 1, '', $config['command_snapshot'], true).' ';
|
||||
$table->data[31][1] .= __('No').' '.html_print_radio_button('command_snapshot', 0, '', $config['command_snapshot'], true);
|
||||
$table->data[31][1] = html_print_checkbox_toogle_switch('command_snapshot', 1, $config['command_snapshot'], true);
|
||||
|
||||
$table->data[32][0] = __('Server logs directory').ui_print_help_tip(__('Directory where the server logs are stored.'), true);
|
||||
$table->data[32][1] = html_print_input_text(
|
||||
|
@ -253,8 +250,7 @@ $table->data['tutorial_mode'][1] = html_print_select(
|
|||
|
||||
$config['past_planned_downtimes'] = isset($config['past_planned_downtimes']) ? $config['past_planned_downtimes'] : 1;
|
||||
$table->data[34][0] = __('Allow create planned downtimes in the past').ui_print_help_tip(__('The planned downtimes created in the past will affect the SLA reports'), true);
|
||||
$table->data[34][1] = __('Yes').' '.html_print_radio_button('past_planned_downtimes', 1, '', $config['past_planned_downtimes'], true).' ';
|
||||
$table->data[34][1] .= __('No').' '.html_print_radio_button('past_planned_downtimes', 0, '', $config['past_planned_downtimes'], true);
|
||||
$table->data[34][1] = html_print_checkbox_toogle_switch('past_planned_downtimes', 1, $config['past_planned_downtimes'], true);
|
||||
|
||||
$table->data[35][0] = __('Limit for bulk operations').ui_print_help_tip(__('Your PHP environment is set to 1000 max_input_vars. This parameter should have the same value or lower.', ini_get('max_input_vars')), true);
|
||||
$table->data[35][1] = html_print_input_text(
|
||||
|
@ -267,16 +263,13 @@ $table->data[35][1] = html_print_input_text(
|
|||
);
|
||||
|
||||
$table->data[36][0] = __('Include agents manually disabled');
|
||||
$table->data[36][1] = __('Yes').' '.html_print_radio_button('include_agents', 1, '', $config['include_agents'], true).' ';
|
||||
$table->data[36][1] .= __('No').' '.html_print_radio_button('include_agents', 0, '', $config['include_agents'], true);
|
||||
$table->data[36][1] = html_print_checkbox_toogle_switch('include_agents', 1, $config['include_agents'], true);
|
||||
|
||||
$table->data[37][0] = __('Audit log directory').ui_print_help_tip(__('Directory where audit log is stored.'), true);
|
||||
$table->data[37][1] = html_print_input_text('auditdir', io_safe_output($config['auditdir']), '', 30, 100, true);
|
||||
|
||||
$table->data[38][0] = __('Set alias as name by default in agent creation');
|
||||
$table->data[38][1] = __('Yes').' '.html_print_radio_button('alias_as_name', 1, '', $config['alias_as_name'], true).' ';
|
||||
$table->data[38][1] .= __('No').' '.html_print_radio_button('alias_as_name', 0, '', $config['alias_as_name'], true);
|
||||
|
||||
$table->data[38][1] = html_print_checkbox_toogle_switch('alias_as_name', 1, $config['alias_as_name'], true);
|
||||
echo '<form id="form_setup" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&section=general&pure='.$config['pure'].'">';
|
||||
|
||||
echo '<fieldset>';
|
||||
|
@ -340,15 +333,24 @@ $(document).ready (function () {
|
|||
$("#timezone").attr("hidden", false);
|
||||
});
|
||||
$("input[name=use_cert]").change(function () {
|
||||
if( $(this).is(":checked") ){
|
||||
var val = $(this).val();
|
||||
if (val == 1) {
|
||||
if( $(this).is(":checked") )
|
||||
$('#setup_general-13').show();
|
||||
}
|
||||
else
|
||||
$('#setup_general-13').hide();
|
||||
}
|
||||
|
||||
});
|
||||
$("input[name=https]").change(function (){
|
||||
if($("input[name=https]").prop('checked')) {
|
||||
$("#dialog").css({'display': 'inline', 'font-weight': 'bold'}).dialog({
|
||||
modal: true,
|
||||
buttons:{
|
||||
"<?php echo __('Close'); ?>": function(){
|
||||
$(this).dialog("close");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
|
@ -368,5 +370,3 @@ function get_sounds()
|
|||
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ $table_behaviour->data[$row][1] = html_print_select($values, 'vc_refr', $config[
|
|||
$row++;
|
||||
|
||||
$table_behaviour->data[$row][0] = __('Paginated module view');
|
||||
$table_behaviour->data[$row][1] = html_print_checkbox(
|
||||
$table_behaviour->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'paginate_module',
|
||||
1,
|
||||
$config['paginate_module'],
|
||||
|
@ -84,7 +84,7 @@ $table_behaviour->data[$row][1] = html_print_checkbox(
|
|||
$row++;
|
||||
|
||||
$table_behaviour->data[$row][0] = __('Display data of proc modules in other format');
|
||||
$table_behaviour->data[$row][1] = html_print_checkbox(
|
||||
$table_behaviour->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'render_proc',
|
||||
1,
|
||||
$config['render_proc'],
|
||||
|
@ -102,7 +102,7 @@ $row++;
|
|||
|
||||
// Daniel maya 02/06/2016 Display menu with click --INI
|
||||
$table_behaviour->data[$row][0] = __('Click to display lateral menus').ui_print_help_tip(__('When enabled, the lateral menus are shown when left clicking them, instead of hovering over them'), true);
|
||||
$table_behaviour->data[$row][1] = html_print_checkbox(
|
||||
$table_behaviour->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'click_display',
|
||||
1,
|
||||
$config['click_display'],
|
||||
|
@ -121,7 +121,7 @@ if (enterprise_installed()) {
|
|||
}
|
||||
|
||||
$table_behaviour->data[$row][0] = __('Classic menu mode').ui_print_help_tip(__('Text menu options always visible, don\'t hide'), true);
|
||||
$table_behaviour->data[$row][1] = html_print_checkbox(
|
||||
$table_behaviour->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'classic_menu',
|
||||
1,
|
||||
$config['classic_menu'],
|
||||
|
@ -491,7 +491,7 @@ if (enterprise_installed()) {
|
|||
|
||||
if (enterprise_installed()) {
|
||||
$table_styles->data[$row][0] = __('Disable logo in graphs');
|
||||
$table_styles->data[$row][1] = html_print_checkbox(
|
||||
$table_styles->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'fixed_graph',
|
||||
1,
|
||||
$config['fixed_graph'],
|
||||
|
@ -507,7 +507,7 @@ if (enterprise_installed()) {
|
|||
*/
|
||||
|
||||
$table_styles->data[$row][0] = __('Disable helps');
|
||||
$table_styles->data[$row][1] = html_print_checkbox(
|
||||
$table_styles->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'disable_help',
|
||||
1,
|
||||
$config['disable_help'],
|
||||
|
@ -516,7 +516,7 @@ $table_styles->data[$row][1] = html_print_checkbox(
|
|||
$row++;
|
||||
|
||||
$table_styles->data[$row][0] = __('Fixed header');
|
||||
$table_styles->data[$row][1] = html_print_checkbox(
|
||||
$table_styles->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'fixed_header',
|
||||
1,
|
||||
$config['fixed_header'],
|
||||
|
@ -525,7 +525,7 @@ $table_styles->data[$row][1] = html_print_checkbox(
|
|||
$row++;
|
||||
|
||||
$table_styles->data[$row][0] = __('Fixed menu');
|
||||
$table_styles->data[$row][1] = html_print_checkbox(
|
||||
$table_styles->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'fixed_menu',
|
||||
1,
|
||||
$config['fixed_menu'],
|
||||
|
@ -535,7 +535,7 @@ $row++;
|
|||
|
||||
// For 5.1 Autohidden menu feature
|
||||
$table_styles->data['autohidden'][0] = __('Autohidden menu');
|
||||
$table_styles->data['autohidden'][1] = html_print_checkbox(
|
||||
$table_styles->data['autohidden'][1] = html_print_checkbox_toogle_switch(
|
||||
'autohidden_menu',
|
||||
1,
|
||||
$config['autohidden_menu'],
|
||||
|
@ -543,13 +543,14 @@ $table_styles->data['autohidden'][1] = html_print_checkbox(
|
|||
);
|
||||
|
||||
$table_styles->data[$row][0] = __('Visual effects and animation');
|
||||
$table_styles->data[$row][1] = html_print_checkbox(
|
||||
$table_styles->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'visual_animation',
|
||||
1,
|
||||
$config['visual_animation'],
|
||||
true
|
||||
);
|
||||
|
||||
|
||||
echo '<fieldset>';
|
||||
echo '<legend>'.__('Style configuration').'</legend>';
|
||||
html_print_table($table_styles);
|
||||
|
@ -566,7 +567,7 @@ $table_gis->size[0] = '50%';
|
|||
$table_gis->data = [];
|
||||
|
||||
$table_gis->data[$row][0] = __('GIS Labels').ui_print_help_tip(__('This enabling this, you get a label with agent name in GIS maps. If you have lots of agents in the map, will be unreadable. Disabled by default.'), true);
|
||||
$table_gis->data[$row][1] = html_print_checkbox(
|
||||
$table_gis->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'gis_label',
|
||||
1,
|
||||
$config['gis_label'],
|
||||
|
@ -679,7 +680,7 @@ $table_font->data[$row][1] = html_print_input_text(
|
|||
$row++;
|
||||
|
||||
$table_font->data[$row][0] = __('Show unit along with value in reports').ui_print_help_tip(__('This enabling this, max, min and avg values will be shown with units.'), true);
|
||||
$table_font->data[$row][1] = html_print_checkbox(
|
||||
$table_font->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'simple_module_value',
|
||||
1,
|
||||
$config['simple_module_value'],
|
||||
|
@ -777,7 +778,7 @@ $table_chars->data[$row][1] = html_print_input_text(
|
|||
$row++;
|
||||
|
||||
$table_chars->data[$row][0] = __('Use round corners');
|
||||
$table_chars->data[$row][1] = html_print_checkbox(
|
||||
$table_chars->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'round_corner',
|
||||
1,
|
||||
$config['round_corner'],
|
||||
|
@ -946,7 +947,7 @@ $table_other->data[$row][0] = __('Show report info with description').ui_print_h
|
|||
__('Custom report description info. It will be applied to all reports and templates by default.'),
|
||||
true
|
||||
);
|
||||
$table_other->data[$row][1] = html_print_checkbox(
|
||||
$table_other->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'custom_report_info',
|
||||
1,
|
||||
$config['custom_report_info'],
|
||||
|
@ -966,6 +967,7 @@ $table_other->data[$row][1] = html_print_checkbox(
|
|||
$config['custom_report_front'],
|
||||
true
|
||||
);
|
||||
|
||||
$row++;
|
||||
// ----------------------------------------------------------------------
|
||||
$dirItems = scandir($config['homedir'].'/images/custom_logo');
|
||||
|
@ -1059,7 +1061,7 @@ $table_other->data['custom_report_front-footer'][1] = html_print_textarea(
|
|||
|
||||
|
||||
$table_other->data[$row][0] = __('Show QR Code icon in the header');
|
||||
$table_other->data[$row][1] = html_print_checkbox(
|
||||
$table_other->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'show_qr_code_header',
|
||||
1,
|
||||
$config['show_qr_code_header'],
|
||||
|
@ -1097,7 +1099,7 @@ $table_other->data[$row][0] .= ui_print_help_tip(
|
|||
__('Show the group name instead the group icon.'),
|
||||
true
|
||||
);
|
||||
$table_other->data[$row][1] = html_print_checkbox(
|
||||
$table_other->data[$row][1] = html_print_checkbox_toogle_switch(
|
||||
'show_group_name',
|
||||
1,
|
||||
$config['show_group_name'],
|
||||
|
@ -1440,6 +1442,7 @@ $(document).ready (function () {
|
|||
.prop('checked');
|
||||
display_custom_report_front(custom_report,$(this).parent().parent().parent().parent().attr('id'));
|
||||
});
|
||||
$(".databox.filters").css('margin-bottom','-10px');
|
||||
});
|
||||
|
||||
// Change the favicon preview when is changed
|
||||
|
|
|
@ -1705,27 +1705,38 @@ function alerts_get_effective_alert_actions($id_agent_module)
|
|||
*
|
||||
* @param int agent_module_id ID of the module
|
||||
*/
|
||||
function alerts_validate_alert_module ($agent_module_id) {
|
||||
|
||||
db_process_sql(sprintf('UPDATE talert_template_modules
|
||||
function alerts_validate_alert_module($agent_module_id)
|
||||
{
|
||||
db_process_sql(
|
||||
sprintf(
|
||||
'UPDATE talert_template_modules
|
||||
SET times_fired=0, internal_counter=0
|
||||
WHERE id_agent_module = %d',
|
||||
$agent_module_id));
|
||||
$agent_module_id
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Validate alerts for the given agent.
|
||||
*
|
||||
* @param int agent_id ID of the agent
|
||||
*/
|
||||
function alerts_validate_alert_agent ($agent_id) {
|
||||
db_process_sql(sprintf('UPDATE talert_template_modules tm
|
||||
function alerts_validate_alert_agent($agent_id)
|
||||
{
|
||||
db_process_sql(
|
||||
sprintf(
|
||||
'UPDATE talert_template_modules tm
|
||||
INNER JOIN tagente_modulo am ON tm.id_agent_module = am.id_agente_modulo
|
||||
SET tm.times_fired=0, tm.internal_counter=0
|
||||
WHERE am.id_agente = %d',
|
||||
$agent_id));
|
||||
$agent_id
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Validates an alert id or an array of alert id's.
|
||||
*
|
||||
|
|
|
@ -2306,6 +2306,89 @@ function html_print_checkbox($name, $value, $checked=false, $return=false, $disa
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Render a checkbox button input toogle switch type. Extended version, use html_print_checkbox_toogle_switch() to simplify.
|
||||
*
|
||||
* @param string Input name.
|
||||
* @param string Input value.
|
||||
* @param string Set the button to be marked (optional, unmarked by default).
|
||||
* @param bool Disable the button (optional, button enabled by default).
|
||||
* @param string Script to execute when onClick event is triggered (optional).
|
||||
* @param string Optional HTML attributes. It's a free string which will be
|
||||
* @param bool Whether to return an output string or echo now (optional, echo by default).
|
||||
*
|
||||
* @return string HTML code if return parameter is true.
|
||||
*/
|
||||
|
||||
|
||||
function html_print_checkbox_toogle_switch_extended($name, $value, $checked, $disabled, $script, $attributes, $return=false, $id='')
|
||||
{
|
||||
static $idcounter = [];
|
||||
|
||||
// If duplicate names exist, it will start numbering. Otherwise it won't
|
||||
if (isset($idcounter[$name])) {
|
||||
$idcounter[$name]++;
|
||||
} else {
|
||||
$idcounter[$name] = 0;
|
||||
}
|
||||
|
||||
$id_aux = preg_replace('/[^a-z0-9\:\;\-\_]/i', '', $name.($idcounter[$name] ? $idcounter[$name] : ''));
|
||||
|
||||
$output = '<label class="toogle_switch"><input name="'.$name.'" type="checkbox" value="'.$value.'" '.($checked ? 'checked="checked"' : '');
|
||||
if ($id == '') {
|
||||
$output .= ' id="checkbox-'.$id_aux.'"';
|
||||
} else {
|
||||
$output .= ' '.$id.'"';
|
||||
}
|
||||
|
||||
if ($script != '') {
|
||||
$output .= ' onclick="'.$script.'"';
|
||||
}
|
||||
|
||||
if ($disabled) {
|
||||
$output .= ' disabled="disabled"';
|
||||
}
|
||||
|
||||
$output .= ' '.$attributes;
|
||||
$output .= ' /><span class="slider"></span></label>';
|
||||
$output .= "\n";
|
||||
|
||||
if ($return === false) {
|
||||
echo $output;
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Render a checkbox button input toogle switch type.
|
||||
*
|
||||
* @param string Input name.
|
||||
* @param string Input value.
|
||||
* @param string Set the button to be marked (optional, unmarked by default).
|
||||
* @param bool Whether to return an output string or echo now (optional, echo by default).
|
||||
* @param boolean $disabled Disable the button (optional, button enabled by default).
|
||||
*
|
||||
* @return string HTML code if return parameter is true.
|
||||
*/
|
||||
|
||||
|
||||
function html_print_checkbox_toogle_switch($name, $value, $checked=false, $return=false, $disabled=false, $script='', $disabled_hidden=false)
|
||||
{
|
||||
$output = html_print_checkbox_toogle_switch_extended($name, $value, (bool) $checked, $disabled, $script, '', true);
|
||||
if (!$disabled_hidden) {
|
||||
$output .= html_print_input_hidden($name.'_sent', 1, true);
|
||||
}
|
||||
|
||||
if ($return === false) {
|
||||
echo $output;
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Prints an image HTML element.
|
||||
*
|
||||
|
@ -2990,4 +3073,3 @@ function html_print_csrf_error()
|
|||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -328,6 +328,7 @@ function modules_change_disabled($id_agent_module, $new_value=1)
|
|||
if ($current_disabled == $new_value) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Validate alerts for disabled modules.
|
||||
if ($new_value == 1) {
|
||||
alerts_validate_alert_module($id_module);
|
||||
|
|
|
@ -911,13 +911,6 @@ input.group_item_min[disabled] {
|
|||
background: #fefefe url(../../images/group_green.disabled.png) no-repeat
|
||||
center !important;
|
||||
}
|
||||
input.color_cloud_min {
|
||||
background: #fefefe url(../../images/color_cloud_item.png) no-repeat center !important;
|
||||
}
|
||||
input.color_cloud_min[disabled] {
|
||||
background: #fefefe url(../../images/color_cloud_item.disabled.png) no-repeat
|
||||
center !important;
|
||||
}
|
||||
|
||||
div#cont {
|
||||
position: fixed;
|
||||
|
@ -1497,12 +1490,14 @@ table.databox {
|
|||
}
|
||||
|
||||
.databox > thead > tr > th,
|
||||
.databox > tbody > tr > th,
|
||||
.databox > thead > tr > th a {
|
||||
.databox > tbody > tr > th {
|
||||
padding: 9px 7px;
|
||||
font-weight: normal;
|
||||
color: #fff;
|
||||
}
|
||||
.databox > td {
|
||||
#border-bottom: 1px solid #e2e2e2;
|
||||
}
|
||||
|
||||
.databox > th * {
|
||||
color: #fff;
|
||||
|
@ -4273,6 +4268,295 @@ div#dialog_messages table th:last-child {
|
|||
text-align: right;
|
||||
}
|
||||
|
||||
/* --- JQUERY-UI --- */
|
||||
.ui-button-text-only .ui-button-text {
|
||||
font-family: "nunito", sans-serif;
|
||||
font-size: 9pt;
|
||||
color: #82b92e;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-title *,
|
||||
.ui-datepicker th * {
|
||||
color: white;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-title select,
|
||||
.ui-datepicker .ui-datepicker-title option {
|
||||
color: #111 !important;
|
||||
}
|
||||
.ui-dialog .ui-dialog-titlebar {
|
||||
display: inherit;
|
||||
text-align: center;
|
||||
padding: 0.4em 1em;
|
||||
height: 30px;
|
||||
position: relative;
|
||||
background-color: #82b92e !important;
|
||||
}
|
||||
.ui-dialog .ui-dialog-title {
|
||||
font-family: "Nunito", sans-serif;
|
||||
margin: 0.1em 0 !important;
|
||||
white-space: nowrap !important;
|
||||
width: 100% !important;
|
||||
overflow: hidden !important;
|
||||
text-overflow: ellipsis !important;
|
||||
font-size: 11pt;
|
||||
position: relative;
|
||||
top: 5px;
|
||||
float: none !important;
|
||||
}
|
||||
.ui-dialog .ui-dialog-titlebar-close {
|
||||
position: absolute !important;
|
||||
right: 1em !important;
|
||||
width: 21px !important;
|
||||
margin: 0px 0 0 0 !important;
|
||||
padding: 1px !important;
|
||||
height: 20px !important;
|
||||
bottom: 30% !important;
|
||||
top: 20% !important;
|
||||
}
|
||||
.ui-dialog .ui-dialog-content {
|
||||
position: relative !important;
|
||||
border: 0;
|
||||
padding: 0.5em 1em !important;
|
||||
background: none !important;
|
||||
overflow: auto !important;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.ui-dialog .ui-dialog-buttonpane {
|
||||
text-align: left;
|
||||
border-width: 1px 0 0 0;
|
||||
background-image: none;
|
||||
margin-top: 0.5em;
|
||||
padding: 0.3em 1em 0.5em 0.4em;
|
||||
}
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
|
||||
float: right;
|
||||
}
|
||||
.ui-dialog .ui-dialog-buttonpane button {
|
||||
margin: 0.5em 1em 0.5em 0 !important;
|
||||
cursor: pointer !important;
|
||||
background: white !important;
|
||||
background-color: white !important;
|
||||
border: 1px solid #82b92e !important;
|
||||
min-height: 35px !important;
|
||||
width: 90px !important;
|
||||
}
|
||||
.ui-widget-content {
|
||||
background: #ffffff url(include/styles/images/ui-bg_flat_75_ffffff_40x100.png)
|
||||
50% 50% repeat-x;
|
||||
}
|
||||
.ui-state-default,
|
||||
.ui-widget-content .ui-state-default,
|
||||
.ui-widget-header .ui-state-default {
|
||||
margin-top: 3px;
|
||||
border: 1px solid #d3d3d3 !important;
|
||||
border-bottom: 0 !important;
|
||||
background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50%
|
||||
repeat-x !important;
|
||||
font-weight: normal !important;
|
||||
color: #555555 !important;
|
||||
}
|
||||
.ui-corner-all,
|
||||
.ui-corner-top,
|
||||
.ui-corner-left,
|
||||
.ui-corner-tl {
|
||||
border-top-left-radius: 0 !important;
|
||||
}
|
||||
.ui-corner-all,
|
||||
.ui-corner-top,
|
||||
.ui-corner-right,
|
||||
.ui-corner-tr {
|
||||
border-top-right-radius: 0 !important;
|
||||
}
|
||||
.ui-corner-all,
|
||||
.ui-corner-bottom,
|
||||
.ui-corner-left,
|
||||
.ui-corner-bl {
|
||||
border-bottom-left-radius: 0 !important;
|
||||
}
|
||||
.ui-corner-all,
|
||||
.ui-corner-bottom,
|
||||
.ui-corner-right,
|
||||
.ui-corner-br {
|
||||
border-bottom-right-radius: 0 !important;
|
||||
}
|
||||
#ui-datepicker-div {
|
||||
border-color: #b1b1b1;
|
||||
background: #ffffff;
|
||||
}
|
||||
.ui-widget-header {
|
||||
background: #b1b1b1 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
.ui-datepicker-calendar th {
|
||||
background-color: #3f3f3f;
|
||||
}
|
||||
.ui-dialog .ui-widget-header {
|
||||
background-color: #82b92e;
|
||||
}
|
||||
.ui_tpicker_hour,
|
||||
.ui_tpicker_minute,
|
||||
.ui_tpicker_second,
|
||||
.ui-slider-handle {
|
||||
border: 1px solid #aaaaaa !important;
|
||||
}
|
||||
.ui-timepicker-div dd {
|
||||
margin: 0px 15px 0px 15px;
|
||||
}
|
||||
.ui-timepicker-div .ui-datepicker-title {
|
||||
color: white;
|
||||
}
|
||||
.ui-datepicker-buttonpane button {
|
||||
border-color: #b1b1b1 !important;
|
||||
}
|
||||
.ui-datepicker-buttonpane .ui-datepicker-current {
|
||||
margin-left: 0.2em !important;
|
||||
}
|
||||
.ui-dialog .ui-widget-content {
|
||||
border: 0px !important;
|
||||
}
|
||||
.ui-dialog {
|
||||
box-shadow: 5px 5px 19px #4e4e4e;
|
||||
border: 0px !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
.ui-dialog-titlebar {
|
||||
border: 0px !important;
|
||||
}
|
||||
.ui-dialog-titlebar .ui-icon-closethick,
|
||||
.ui-dialog-titlebar .ui-state-default,
|
||||
.ui-dialog-titlebar .ui-state-hover,
|
||||
.ui-dialog-titlebar button {
|
||||
background: transparent;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.ui-dialog-title {
|
||||
color: #ffffff;
|
||||
font-size: 9pt;
|
||||
}
|
||||
.ui-widget input,
|
||||
.ui-widget select,
|
||||
.ui-widget textarea,
|
||||
.ui-widget button {
|
||||
font-family: Verdana, Arial, sans-serif !important;
|
||||
}
|
||||
|
||||
a.ui-button:active,
|
||||
.ui-button:active,
|
||||
.ui-button.ui-state-active:hover,
|
||||
.ui-state-focus .ui-widget-content,
|
||||
.ui-state-focus .ui-widget-header,
|
||||
.ui-state-focus .ui-button:hover,
|
||||
.ui-button:focus {
|
||||
background: transparent !important;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.ui-state-hover,
|
||||
.ui-widget-content .ui-state-hover,
|
||||
.ui-widget-header .ui-state-hover {
|
||||
border: 1px solid #999999 !important;
|
||||
border-bottom: 0 !important;
|
||||
background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50%
|
||||
repeat-x !important;
|
||||
}
|
||||
|
||||
.ui-state-active,
|
||||
.ui-widget-content .ui-state-active,
|
||||
.ui-widget-header .ui-state-active {
|
||||
border: 1px solid #aaaaaa !important;
|
||||
border-bottom: 0 !important;
|
||||
background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50%
|
||||
repeat-x !important;
|
||||
font-weight: normal !important;
|
||||
color: #212121 !important;
|
||||
}
|
||||
.ui-state-active a,
|
||||
.ui-state-active a:link,
|
||||
.ui-state-active a:visited {
|
||||
color: #212121 !important;
|
||||
}
|
||||
|
||||
ul.ui-front {
|
||||
z-index: 1000000 !important;
|
||||
padding-right: 0px !important;
|
||||
}
|
||||
|
||||
ul.ui-front li {
|
||||
padding: 3px !important;
|
||||
}
|
||||
|
||||
ul.ui-front li:hover {
|
||||
background-color: #e1e3e1 !important;
|
||||
}
|
||||
|
||||
ul.ui-front li a.ui-menu-item-wrapper {
|
||||
background: transparent !important;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
ul.ui-front li a.ui-menu-item-wrapper span {
|
||||
padding-left: 5px !important;
|
||||
}
|
||||
|
||||
ul.ui-front li a.ui-menu-item-wrapper:hover {
|
||||
text-decoration: none !important;
|
||||
}
|
||||
/* --- END - JQUERY-UI --- */
|
||||
|
||||
.toogle_switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 47px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.toogle_switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #ccc;
|
||||
-webkit-transition: 0.7s;
|
||||
transition: 0.7s;
|
||||
border-radius: 34px;
|
||||
}
|
||||
|
||||
.slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
left: 4px;
|
||||
bottom: 4px;
|
||||
background-color: white;
|
||||
-webkit-transition: 0.7s;
|
||||
transition: 0.7s;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
input:checked + .slider {
|
||||
background-color: #82b92e;
|
||||
}
|
||||
|
||||
input:focus + .slider {
|
||||
box-shadow: 0 0 1px #82b92e;
|
||||
}
|
||||
|
||||
input:checked + .slider:before {
|
||||
-webkit-transform: translateX(26px);
|
||||
-ms-transform: translateX(26px);
|
||||
transform: translateX(26px);
|
||||
background-color: rgb(197, 235, 192);
|
||||
}
|
||||
|
||||
/* jQuery dialog */
|
||||
.no-close .ui-dialog-titlebar-close {
|
||||
display: none;
|
||||
|
|
|
@ -112,8 +112,8 @@
|
|||
</div>
|
||||
<div style='height: 10px'>
|
||||
<?php
|
||||
$version = '7.0NG.731';
|
||||
$build = '190213';
|
||||
$version = '7.0NG.731';
|
||||
$build = '190211';
|
||||
$banner = "v$version Build $build";
|
||||
|
||||
error_reporting(0);
|
||||
|
|
Loading…
Reference in New Issue