Added optional popup for pdf reports display.
[fa-stable.git] / admin / display_prefs.php
index 01ee7b68202300383f7e7ca65bb8fb52c32769a3..fcf8c9addbfdc8f968ea6e05e3204a8200c97e10 100644 (file)
@@ -22,12 +22,15 @@ if (isset($_POST['setprefs']))
                check_value('show_codes'),
                $_POST['date_format'], $_POST['date_sep'],
                $_POST['tho_sep'], $_POST['dec_sep'],
-               $_POST['theme'], $_POST['page_size']);
+               $_POST['theme'], $_POST['page_size'], check_value('show_hints'),
+               $_POST['profile'], check_value('rep_popup'));
 
        language::set_language($_POST['language']);
-       
+
+       flush_dir($comp_path.'/'.user_company().'/js_cache');   
+
        if (user_theme() != $theme)
-               Redirect("");
+               reload_page("");
 
        display_notification_centered(_("Display settings have been updated."));
 }
@@ -37,10 +40,10 @@ start_table($table_style2);
 
 table_section_title(_("Decimal Places"));
 
-text_row_ex(_("Prices/Amounts:"), 'prices', 5, 5, user_price_dec());
-text_row_ex(_("Quantities:"), 'Quantities', 5, 5, user_qty_dec());
-text_row_ex(_("Exchange Rates:"), 'Rates', 5, 5, user_exrate_dec());
-text_row_ex(_("Percentages:"), 'Percent',  5, 5, user_percent_dec());
+text_row_ex(_("Prices/Amounts:"), 'prices', 5, 5, '', user_price_dec());
+text_row_ex(_("Quantities:"), 'Quantities', 5, 5, '', user_qty_dec());
+text_row_ex(_("Exchange Rates:"), 'Rates', 5, 5, '', user_exrate_dec());
+text_row_ex(_("Percentages:"), 'Percent',  5, 5, '', user_percent_dec());
 
 table_section_title(_("Dateformat and Separators"));
 
@@ -63,6 +66,8 @@ possible separators can be added by modifying the array definition by editing th
 
 table_section_title(_("Miscellaneous"));
 
+check_row(_("Show hints for new users:"), 'show_hints', user_hints());
+
 check_row(_("Show GL Information:"), 'show_gl', user_show_gl_info());
 
 check_row(_("Show Item Codes:"), 'show_codes', user_show_codes());
@@ -77,6 +82,15 @@ pagesizes_list_row(_("Page Size:"), "page_size", user_pagesize());
 /* The array $pagesizes is set up in config.php for modifications
 possible separators can be added by modifying the array definition by editing that file */
 
+if (!isset($_POST['profile']))
+       $_POST['profile'] = user_print_profile();
+
+print_profiles_list_row(_("Printing profile"). ':', 'profile', 
+       null, _('Browser printing support'));
+
+check_row(_("Use popup window to display reports:"), 'rep_popup', user_rep_popup(),
+       false, _('Set this option to on if your browser directly supports pdf files'));
+
 table_section_title(_("Language"));
 
 if (!isset($_POST['language']))
@@ -86,7 +100,7 @@ languages_list_row(_("Language:"), 'language', $_POST['language']);
 
 end_table(1);
 
-submit_center('setprefs', _("Update"));
+submit_center('setprefs', _("Update"), true, '', true);
 
 end_form(2);