From: Christopher Burger Date: Fri, 12 Jan 2018 20:36:13 +0000 (-0500) Subject: RT# 78617 - fixed preference field customer_view_emails to only except whole numbers... X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=a0ef3549089ec5806f9e489ab6e54daebb62e380 RT# 78617 - fixed preference field customer_view_emails to only except whole numbers, also added redirection back to preference page after edit. Conflicts: httemplate/pref/pref.html --- diff --git a/httemplate/pref/pref-process.html b/httemplate/pref/pref-process.html index f5b5bb68e..cf0d8240f 100644 --- a/httemplate/pref/pref-process.html +++ b/httemplate/pref/pref-process.html @@ -4,6 +4,7 @@ % } else { <% include('/elements/header.html', 'Preferences updated') %> <% include('/elements/footer.html') %> +<% $cgi->redirect(popurl(1). "pref.html?alert=Preferences updated" ) %> % } <%init> diff --git a/httemplate/pref/pref.html b/httemplate/pref/pref.html index d976871f5..882975ad6 100644 --- a/httemplate/pref/pref.html +++ b/httemplate/pref/pref.html @@ -1,9 +1,16 @@ <% include('/elements/header.html', 'Preferences for '. getotaker ) %> +% my $js_form_validate = { 'pref_form' => { 'name' => 'pref_form' } }; +
<% include('/elements/error.html') %> +<<<<<<< HEAD +======= +<& /elements/alert.html &> + +% if ( FS::Auth->auth_class->can('change_password') ) { <% mt('Change password (leave blank for no change)') |h %> <% ntable("#cccccc",2) %> @@ -156,10 +163,14 @@ Interface +% 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.'; + How many recent outbound emails to show in customer view - + @@ -273,7 +284,13 @@ Vonage integration (see Click2Call -<% include('/elements/footer.html') %> +% my %footerdata = ( +% 'formvalidation' => $js_form_validate, +% ); +<% include("/elements/footer.html", %footerdata) %> + +%#<&/elements/footer.html &> + <%init> my $curuser = $FS::CurrentUser::CurrentUser;