mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 09:15:15 +02:00
Changed radio buttons by checkbox switch
Former-commit-id: f0c64cecbf9e1197be08a9a95248d3b4ea8bd949
This commit is contained in:
parent
3ed6a2b089
commit
488be0d602
@ -134,7 +134,6 @@ if (is_ajax()) {
|
|||||||
set_unless_defined($config['double_auth_enabled'], false);
|
set_unless_defined($config['double_auth_enabled'], false);
|
||||||
$row = [];
|
$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['name'] = __('Double authentication').ui_print_help_tip(__('If this option is enabled, the users can use double authentication with their accounts'), true);
|
||||||
$row['control'] = html_print_input_hidden('double_auth_enabled', 0);
|
|
||||||
$row['control'] .= html_print_checkbox_switch('double_auth_enabled', 1, $config['double_auth_enabled'], true);
|
$row['control'] .= html_print_checkbox_switch('double_auth_enabled', 1, $config['double_auth_enabled'], true);
|
||||||
$table->data['double_auth_enabled'] = $row;
|
$table->data['double_auth_enabled'] = $row;
|
||||||
|
|
||||||
|
@ -1,18 +1,23 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* ______ ___ _______ _______ ________
|
||||||
|
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||||
|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||||
|
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||||
|
*
|
||||||
|
* ============================================================================
|
||||||
|
* Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
|
||||||
|
* Please see http://pandorafms.org for full contribution list
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation for version 2.
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
* ============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
// Pandora FMS - http://pandorafms.com
|
|
||||||
// ==================================================
|
|
||||||
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
|
|
||||||
// Please see http://pandorafms.org for full contribution list
|
|
||||||
// This program is free software; you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU General Public License
|
|
||||||
// as published by the Free Software Foundation for version 2.
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
// Warning: This file may be required into the metaconsole's setup
|
|
||||||
// Load global vars
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
check_login();
|
check_login();
|
||||||
@ -48,8 +53,7 @@ $table_enable->style['name'] = 'font-weight: bold';
|
|||||||
// Enable eHorus
|
// Enable eHorus
|
||||||
$row = [];
|
$row = [];
|
||||||
$row['name'] = __('Enable eHorus');
|
$row['name'] = __('Enable eHorus');
|
||||||
$row['control'] = __('Enabled').' '.html_print_radio_button('ehorus_enabled', 1, '', $config['ehorus_enabled'], true).' ';
|
$row['control'] = html_print_checkbox_switch('ehorus_enabled', false, $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);
|
$row['button'] = html_print_submit_button(__('Update'), 'update_button', false, 'class="sub upd"', true);
|
||||||
$table_enable->data['ehorus_enabled'] = $row;
|
$table_enable->data['ehorus_enabled'] = $row;
|
||||||
|
|
||||||
@ -169,7 +173,7 @@ if ($config['ehorus_enabled']) {
|
|||||||
if (event.target.value == '1') showFields();
|
if (event.target.value == '1') showFields();
|
||||||
else hideFields();
|
else hideFields();
|
||||||
}
|
}
|
||||||
$('input:radio[name="ehorus_enabled"]').change(handleEnable);
|
$('input:checkbox[name="ehorus_enabled"]').change(handleEnable);
|
||||||
|
|
||||||
var handleTest = function (event) {
|
var handleTest = function (event) {
|
||||||
var user = $('input#text-ehorus_user').val();
|
var user = $('input#text-ehorus_user').val();
|
||||||
|
@ -1,17 +1,23 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* ______ ___ _______ _______ ________
|
||||||
|
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||||
|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||||
|
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||||
|
*
|
||||||
|
* ============================================================================
|
||||||
|
* Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
|
||||||
|
* Please see http://pandorafms.org for full contribution list
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation for version 2.
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
* ============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
// Pandora FMS - http://pandorafms.com
|
|
||||||
// ==================================================
|
|
||||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
|
||||||
// Please see http://pandorafms.org for full contribution list
|
|
||||||
// This program is free software; you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU General Public License
|
|
||||||
// as published by the Free Software Foundation for version 2.
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
// Load global vars
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
check_login();
|
check_login();
|
||||||
@ -269,12 +275,10 @@ $table->data[37][0] = __('Audit log directory').ui_print_help_tip(__('Directory
|
|||||||
$table->data[37][1] = html_print_input_text('auditdir', io_safe_output($config['auditdir']), '', 30, 100, 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][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] = html_print_checkbox_switch('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[39][0] = __('Unique IP').ui_print_help_tip(__('Set the primary IP address as the unique IP, preventing the same primary IP address from being used in more than one agent'), true);
|
$table->data[39][0] = __('Unique IP').ui_print_help_tip(__('Set the primary IP address as the unique IP, preventing the same primary IP address from being used in more than one agent'), true);
|
||||||
$table->data[39][1] = __('Yes').' '.html_print_radio_button('unique_ip', 1, '', $config['unique_ip'], true).' ';
|
$table->data[39][1] = html_print_checkbox_switch('unique_ip', 1, $config['unique_ip'], true);
|
||||||
$table->data[39][1] .= __('No').' '.html_print_radio_button('unique_ip', 0, '', $config['unique_ip'], true);
|
|
||||||
|
|
||||||
echo '<form id="form_setup" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&section=general&pure='.$config['pure'].'">';
|
echo '<form id="form_setup" method="post" action="index.php?sec=gsetup&sec2=godmode/setup/setup&section=general&pure='.$config['pure'].'">';
|
||||||
|
|
||||||
|
@ -1,16 +1,23 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* ______ ___ _______ _______ ________
|
||||||
|
* | __ \.-----.--.--.--| |.-----.----.-----. | ___| | | __|
|
||||||
|
* | __/| _ | | _ || _ | _| _ | | ___| |__ |
|
||||||
|
* |___| |___._|__|__|_____||_____|__| |___._| |___| |__|_|__|_______|
|
||||||
|
*
|
||||||
|
* ============================================================================
|
||||||
|
* Copyright (c) 2005-2019 Artica Soluciones Tecnologicas
|
||||||
|
* Please see http://pandorafms.org for full contribution list
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation for version 2.
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
* ============================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
// Pandora FMS - http://pandorafms.com
|
|
||||||
// ==================================================
|
|
||||||
// Copyright (c) 2005-2011 Artica Soluciones Tecnologicas
|
|
||||||
// Please see http://pandorafms.org for full contribution list
|
|
||||||
// This program is free software; you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU General Public License
|
|
||||||
// as published by the Free Software Foundation; version 2
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
require_once 'include/functions_ui.php';
|
require_once 'include/functions_ui.php';
|
||||||
@ -55,21 +62,19 @@ $table->data[5][0] = '<b>'.__('Maximum chart resolution').'</b>'.ui_print_help_t
|
|||||||
$table->data[5][1] = html_print_input_text('netflow_max_resolution', $config['netflow_max_resolution'], false, 50, 200, true);
|
$table->data[5][1] = html_print_input_text('netflow_max_resolution', $config['netflow_max_resolution'], false, 50, 200, true);
|
||||||
|
|
||||||
$table->data[6][0] = '<b>'.__('Disable custom live view filters').'</b>'.ui_print_help_tip(__('Disable the definition of custom filters in the live view. Only existing filters can be used.'), true);
|
$table->data[6][0] = '<b>'.__('Disable custom live view filters').'</b>'.ui_print_help_tip(__('Disable the definition of custom filters in the live view. Only existing filters can be used.'), true);
|
||||||
$table->data[6][1] = __('Yes').' '.html_print_radio_button('netflow_disable_custom_lvfilters', 1, '', $config['netflow_disable_custom_lvfilters'], true).' ';
|
$table->data[6][1] = html_print_checkbox_switch('netflow_disable_custom_lvfilters', 1, $config['netflow_disable_custom_lvfilters'], true);
|
||||||
$table->data[6][1] .= __('No').' '.html_print_radio_button('netflow_disable_custom_lvfilters', 0, '', $config['netflow_disable_custom_lvfilters'], true);
|
|
||||||
$table->data[7][0] = '<b>'.__('Netflow max lifetime').'</b>'.ui_print_help_tip(__('Sets the maximum lifetime for netflow data in days.'), true);
|
$table->data[7][0] = '<b>'.__('Netflow max lifetime').'</b>'.ui_print_help_tip(__('Sets the maximum lifetime for netflow data in days.'), true);
|
||||||
$table->data[7][1] = html_print_input_text('netflow_max_lifetime', $config['netflow_max_lifetime'], false, 50, 200, true);
|
$table->data[7][1] = html_print_input_text('netflow_max_lifetime', $config['netflow_max_lifetime'], false, 50, 200, true);
|
||||||
|
|
||||||
$table->data[8][0] = '<b>'.__('Name resolution for IP address').'</b>'.ui_print_help_tip(__('Resolve the IP addresses to get their hostnames.'), true);
|
$table->data[8][0] = '<b>'.__('Name resolution for IP address').'</b>'.ui_print_help_tip(__('Resolve the IP addresses to get their hostnames.'), true);
|
||||||
$onclick = "if (!confirm('".__('Warning').'. '.__('IP address resolution can take a lot of time')."')) return false;";
|
$onclick = "if (!confirm('".__('Warning').'. '.__('IP address resolution can take a lot of time')."')) return false;";
|
||||||
$table->data[8][1] = __('Yes').' '.html_print_radio_button_extended('netflow_get_ip_hostname', 1, '', $config['netflow_get_ip_hostname'], false, $onclick, '', true).' ';
|
$table->data[8][1] = html_print_checkbox_switch_extended('netflow_get_ip_hostname', 1, $config['netflow_get_ip_hostname'], false, $onclick, '', true);
|
||||||
$table->data[8][1] .= __('No').' '.html_print_radio_button('netflow_get_ip_hostname', 0, '', $config['netflow_get_ip_hostname'], true);
|
|
||||||
|
|
||||||
echo '<form id="netflow_setup" method="post">';
|
echo '<form id="netflow_setup" method="post">';
|
||||||
|
|
||||||
html_print_table($table);
|
html_print_table($table);
|
||||||
|
|
||||||
// Update button
|
// Update button.
|
||||||
echo '<div class="action-buttons" style="width:100%;">';
|
echo '<div class="action-buttons" style="width:100%;">';
|
||||||
html_print_input_hidden('update_config', 1);
|
html_print_input_hidden('update_config', 1);
|
||||||
html_print_submit_button(__('Update'), 'upd_button', false, 'class="sub upd"');
|
html_print_submit_button(__('Update'), 'upd_button', false, 'class="sub upd"');
|
||||||
|
@ -961,7 +961,7 @@ $table_other->data[$row][0] = __('Custom report front page').ui_print_help_tip(
|
|||||||
__('Custom report front page. It will be applied to all reports and templates by default.'),
|
__('Custom report front page. It will be applied to all reports and templates by default.'),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
$table_other->data[$row][1] = html_print_checkbox(
|
$table_other->data[$row][1] = html_print_checkbox_switch(
|
||||||
'custom_report_front',
|
'custom_report_front',
|
||||||
1,
|
1,
|
||||||
$config['custom_report_front'],
|
$config['custom_report_front'],
|
||||||
@ -1435,12 +1435,12 @@ $(document).ready (function () {
|
|||||||
// Juanma (06/05/2014) New feature: Custom front page for reports
|
// Juanma (06/05/2014) New feature: Custom front page for reports
|
||||||
var custom_report = $('#checkbox-custom_report_front')
|
var custom_report = $('#checkbox-custom_report_front')
|
||||||
.prop('checked');
|
.prop('checked');
|
||||||
display_custom_report_front(custom_report,$('#checkbox-custom_report_front').parent().parent().parent().parent().attr('id'));
|
display_custom_report_front(custom_report,$('#checkbox-custom_report_front').parent().parent().parent().parent().parent().attr('id'));
|
||||||
|
|
||||||
$("#checkbox-custom_report_front").click( function() {
|
$("#checkbox-custom_report_front").change( function() {
|
||||||
var custom_report = $('#checkbox-custom_report_front')
|
var custom_report = $('#checkbox-custom_report_front')
|
||||||
.prop('checked');
|
.prop('checked');
|
||||||
display_custom_report_front(custom_report,$(this).parent().parent().parent().parent().attr('id'));
|
display_custom_report_front(custom_report,$(this).parent().parent().parent().parent().parent().attr('id'));
|
||||||
});
|
});
|
||||||
$(".databox.filters").css('margin-bottom','-10px');
|
$(".databox.filters").css('margin-bottom','-10px');
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user