From 9cd99307dde681653158d44b557398e0f6498420 Mon Sep 17 00:00:00 2001 From: Arturo Gonzalez Date: Mon, 10 Apr 2017 13:58:42 +0200 Subject: [PATCH] Added selector in visual conf to select a csv divider --- .../godmode/setup/setup_visuals.php | 41 +++++++++++++++++++ pandora_console/include/functions_config.php | 9 +++- 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index cb4958306e..446193a735 100755 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -755,6 +755,26 @@ $table_other->data[$row][1] .= html_print_input_hidden ('interval_values', $conf $table_other->data[$row][1] .= html_print_input_hidden ('interval_to_delete', '', true); //---------------------------------------------------------------------- $row++; +html_debug($config['csv_divider']); +$common_dividers = array( + ";" => ";", + "," => ",", + "|" => "|"); +$table_other->data[$row][0] = __('CSV divider'); +if ($config['csv_divider'] != ";" && $config['csv_divider'] != "," && $config['csv_divider'] != "|") { + $table_other->data[$row][1] = html_print_input_text ('csv_divider', $config['csv_divider'], "", 20, 255, true); + $table_other->data[$row][1] .= '' . + html_print_image('images/default_list.png', true, array('id' => 'select')) . + ""; +} +else { + $table_other->data[$row][1] = html_print_select ($common_dividers, 'csv_divider', $config['csv_divider'], "", '', '', true, false, false); + $table_other->data[$row][1] .= '' . + html_print_image('images/pencil.png', true, array('id' => 'pencil')) . + ""; +} +$row++; + echo "
"; echo "" . __('Other configuration') . ""; @@ -792,6 +812,27 @@ ui_require_javascript_file('tiny_mce', 'include/javascript/tiny_mce/'); ?>