X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fpref%2Fpref.html;h=724967d95079f637dcd838ed6cb60e4bdba8f689;hp=069f914ed646546334ca0d57a808b299693f37b1;hb=611a7c3b4b717a595a530402d15c1960ba3424bd;hpb=8591b5a157a2ee24c1467718eb0ce731a388f5c1 diff --git a/httemplate/pref/pref.html b/httemplate/pref/pref.html index 069f914ed..724967d95 100644 --- a/httemplate/pref/pref.html +++ b/httemplate/pref/pref.html @@ -1,83 +1,255 @@ -<% include('/elements/header.html', 'Preferences for '. getotaker ) %> +<& /elements/header.html, mt('Preferences for [_1]', $FS::CurrentUser::CurrentUser->username) &>
-<% include('/elements/error.html') %> +<& /elements/error.html &> +% if ( FS::Auth->auth_class->can('change_password') ) { -Change password (leave blank for no change) + <% emt('Change password (leave blank for no change)') %> + <% ntable("#cccccc",2) %> + + + <% emt("Current password:") %> + + + + + <% emt("New password:") %> + + + + + <% emt("Re-enter new password:") %> + + + + +
+ +% } + +<% emt("Interface") %> <% ntable("#cccccc",2) %> - Current password: - + <% emt("Locale:") %> + + + + + + + <% emt("Menu location:") %> + + > <% emt("Left") %>
+ > <% emt("Top") %>
+ + + + + + <% emt("Enable mobile-friendly menu:") %> + + option('mobile_menu') ? 'CHECKED' : '' %>> + + + + + <% emt("Default customer view:") %> + + + + + +% my $history_order = $curuser->option('history_order') || 'oldest'; + + <% emt("Customer history sort order:") %> + + <& /elements/select.html, + field => 'history_order', + curr_value => $history_order, + options => [ 'oldest', 'newest' ], + labels => { 'oldest' => mt('Oldest first'), + 'newest' => mt('Newest first'), + }, + &> + + + + + <% emt("Spreadsheet download format:") %> + + + + + + + <% emt("Disable HTML editor for customer notes:") %> + + option('disable_html_editor') ? 'CHECKED' : '' %>> + + + + + <% emt("Disable submission on Enter key - one-time charges:") %> + + option('disable_enter_submit_onetimecharge') ? 'CHECKED' : '' %>> + - New password: - + <% emt("Don't copy MAC address delimiters to clipboard") %> + + option('enable_mask_clipboard_hack') ? 'CHECKED' : '' %>> + - Re-enter new password: - + <% emt("Scale documents to fit on a letter-size page") %> + + option('printtofit') ? 'CHECKED' : '' %>> + + + + + <% emt("How many recently-modified customers displayed on dashboard") %> + + + + + + + <% emt("How many recent outbound emails to show in customer view") %> + + +
-Interface +<% emt("Email Address") %> <% ntable("#cccccc",2) %> - Menu location: + <% emt("Email Address(es) (comma separated) ") %> - > Left
- > Top
+ -
-Email Address +<% emt("Development") %> <% ntable("#cccccc",2) %> - Email Address(es) (comma separated) - - - + <% emt("Show customer package timestamps:") %> + option('cust_pkg-display_times') ? 'CHECKED' : '' %>> + + + <% emt("Show internal package numbers:") %> + option('show_pkgnum') ? 'CHECKED' : '' %>> + + + <% emt("Show config item counts:") %> + option('show_confitem_counts') ? 'CHECKED' : '' %>> + + + <% emt("Show export data on service view (when available):") %> + option('export_getsettings') ? 'CHECKED' : '' %>> + + + <% emt("Show database profiling (when available):") %> + option('show_db_profile') ? 'CHECKED' : '' %>> + + + <% emt("Save database profiling logs (when available):") %> + option('save_db_profile') ? 'CHECKED' : '' %>> + + + <% emt("Save temporary invoice typesetting files:") %> + option('save_tmp_typesetting') ? 'CHECKED' : '' %>>
+% if ( $curuser->access_right('Employee preference telephony integration') ) { -Vonage integration (see Click2Call) +<% emt("SNOM integration") %> <% ntable("#cccccc",2) %> - Vonage phone number - + <% emt("SNOM IP address") %> + - Vonage username - + <% emt("SNOM HTTP username (if necessary)") %> + - Vonage password - + <% emt("SNOM HTTP password (if necessary)") %> +
+<% emt("OR")%>

+ +<% emt("Vonage integration (see") %> <% emt("Click2Call") %>) +<% ntable("#cccccc",2) %> + + + <% emt("Vonage phone number") %> + + + + + <% emt("Vonage username") %> + + + + + <% emt("Vonage password") %> + + + + +
+ +% } % foreach my $prop (qw( height width availHeight availWidth colorDepth )) { @@ -86,17 +258,43 @@ Vonage integration (see Click2Call % } - +"> -<% include('/elements/footer.html') %> +<&/elements/footer.html &> <%init> +my $curuser = $FS::CurrentUser::CurrentUser; + +#false laziness w/view/cust_main.cgi and Conf.pm (cust_main-default_view) + +tie my %customer_views, 'Tie::IxHash', + 'Basics' => 'basics', + 'Notes' => 'notes', #notes and files? + 'Tickets' => 'tickets', + 'Appointments' => 'appointments', + 'Quotations' => 'quotations', + 'Packages' => 'packages', + 'Payment History' => 'payment_history', +; +$customer_views{'Change History'} = 'change_history' + if $curuser->access_right('View customer history'); + # XSS via your own preferences? seems unlikely, but nice try anyway... -( $FS::CurrentUser::CurrentUser->option('menu_position') || 'left' ) +( $curuser->option('menu_position') || 'top' ) =~ /^(\w+)$/ or die "illegal menu_position"; my $menu_position = $1; -( $FS::CurrentUser::CurrentUser->option('email_address') ) - =~ /^([,\w\@.]*)$/ or die "illegal email_address"; #too late +( $curuser->option('email_address') ) + =~ /^([,\w\@.\-]*)$/ or die "illegal email_address"; #too late my $email_address = $1; +my $conf = new FS::Conf; + +my @locales = $conf->config('available-locales'); + +if ( ! @locales ) { + + @locales = FS::Locales->locales ; + +} +