X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fpref%2Fpref.html;h=56fde6d443e814554d01bd6033d783eb06beb194;hp=8e56355dbeb0c3afb5e353e3d226a6a7f40076c4;hb=833cfe5c9938d33c3e6b97ed610c25a7afa6eb04;hpb=2d57d71025519495dd1cdfca3799a6652c674637 diff --git a/httemplate/pref/pref.html b/httemplate/pref/pref.html index 8e56355db..56fde6d44 100644 --- a/httemplate/pref/pref.html +++ b/httemplate/pref/pref.html @@ -1,40 +1,44 @@ -<% include('/elements/header.html', 'Preferences for '. getotaker ) %> +<& /elements/header.html, mt('Preferences for [_1]', $FS::CurrentUser::CurrentUser->username) &> + +% my $js_form_validate = { 'pref_form' => { 'name' => 'pref_form' } };
-<% include('/elements/error.html') %> +<& /elements/error.html &> +% if ( FS::Auth->auth_class->can('change_password') ) { -Change password (leave blank for no change) -<% ntable("#cccccc",2) %> + <% emt('Change password (leave blank for no change)') %> + - - - - + + + + - - - - + + + + - - - - + + + + -
Current password:
<% emt("Current password:") %>
New password:
<% emt("New password:") %>
Re-enter new password:
<% emt("Re-enter new password:") %>
-
+ +
+% } -Interface -<% ntable("#cccccc",2) %> +<% emt("Interface") %> + - + - + - + - + - + +% my $history_order = $curuser->option('history_order') || 'oldest'; - + + + + + + + + + + + - + + + + + + + + + + + + + + + + + +% my $validate_field_cve = 'customer_view_emails'; +% $js_form_validate->{pref_form}->{validate_fields}{$validate_field_cve} = 'digits: true'; +% $js_form_validate->{pref_form}->{error_message}{$validate_field_cve} = 'Please only enter numbers here.'; + + + + + + +
Locale: <% emt("Locale:") %>
Menu location: <% emt("Menu location:") %> - > Left
- > Top
+ > <% emt("Left") %>
+ > <% emt("Top") %>
Enable mobile-friendly menu: <% emt("Enable mobile-friendly menu:") %> option('mobile_menu') ? 'CHECKED' : '' %>> @@ -62,7 +66,7 @@ Interface
Default customer view: <% emt("Default customer view:") %>
Disable HTML editor for customer notes: <% 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' : '' %>>
Disable submission on [Enter] key - one-time charges: <% emt("Disable submission on Enter key - one-time charges:") %> option('disable_enter_submit_onetimecharge') ? 'CHECKED' : '' %>>
<% emt("Don't copy MAC address delimiters to clipboard") %> + option('enable_mask_clipboard_hack') ? 'CHECKED' : '' %>> +
<% emt("When printing, scale HTML 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") %> +

-Email Address -<% ntable("#cccccc",2) %> +<% emt("Email Address") %> + - + @@ -108,81 +174,88 @@ Email Address
-Development -<% ntable("#cccccc",2) %> +<% emt("Development") %> +
Email Address(es) (comma separated) <% emt("Email Address(es) (comma separated) ") %>
- + - + - + - + - + - + + + + +
Show customer package timestamps: <% emt("Show customer package timestamps:") %> option('cust_pkg-display_times') ? 'CHECKED' : '' %>>
Show internal package numbers: <% emt("Show internal package numbers:") %> option('show_pkgnum') ? 'CHECKED' : '' %>>
Show config item counts: <% emt("Show config item counts:") %> option('show_confitem_counts') ? 'CHECKED' : '' %>>
Show export data on service view (when available): <% emt("Show export data on service view (when available):") %> option('export_getsettings') ? 'CHECKED' : '' %>>
Show database profiling (when available): <% emt("Show database profiling (when available):") %> option('show_db_profile') ? 'CHECKED' : '' %>>
Save database profiling logs (when available): <% emt("Save database profiling logs (when available):") %> option('save_db_profile') ? 'CHECKED' : '' %>>
<% emt("Save temporary invoice typesetting files:") %> option('save_tmp_typesetting') ? 'CHECKED' : '' %>>

-SNOM integration +% if ( $curuser->access_right('Employee preference telephony integration') ) { + +<% emt("SNOM integration") %> <% ntable("#cccccc",2) %> - SNOM IP address + <% emt("SNOM IP address") %> - SNOM HTTP username (if necessary) + <% emt("SNOM HTTP username (if necessary)") %> - SNOM HTTP password (if necessary) + <% emt("SNOM HTTP password (if necessary)") %>
-OR

+<% emt("OR")%>

-Vonage integration (see Click2Call) +<% emt("Vonage integration (see") %> <% emt("Click2Call") %>) <% ntable("#cccccc",2) %> - Vonage phone number + <% emt("Vonage phone number") %> - Vonage username + <% emt("Vonage username") %> - Vonage password + <% emt("Vonage password") %>
+% } % foreach my $prop (qw( height width availHeight availWidth colorDepth )) { @@ -191,9 +264,13 @@ Vonage integration (see Click2Call % } - +"> + +% my %footerdata = ( +% 'formvalidation' => $js_form_validate, +% ); +<% include("/elements/footer.html", %footerdata) %> -<% include('/elements/footer.html') %> <%init> my $curuser = $FS::CurrentUser::CurrentUser; @@ -204,19 +281,30 @@ 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'); -$customer_views{'Jumbo'} = 'jumbo'; # XSS via your own preferences? seems unlikely, but nice try anyway... ( $curuser->option('menu_position') || 'top' ) =~ /^(\w+)$/ or die "illegal menu_position"; my $menu_position = $1; ( $curuser->option('email_address') ) - =~ /^([,\w\@.]*)$/ or die "illegal email_address"; #too late + =~ /^([,\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 ; + +} +