diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2018-02-09 19:10:00 -0800 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2018-02-09 19:10:00 -0800 |
| commit | d45dd4a826f314fb5459747590d3e11cd80c211f (patch) | |
| tree | c1dd2edd4bc42b12cc9a995e95dd7fb630da925e /httemplate/pref/pref.html | |
| parent | 4b67c9f8cfc9f944b7758e7e69ac1f9f188ffa47 (diff) | |
| parent | 15d596e3090f3bde642917b56563736cd1ee2e90 (diff) | |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/pref/pref.html')
| -rw-r--r-- | httemplate/pref/pref.html | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/httemplate/pref/pref.html b/httemplate/pref/pref.html index abd1ea57f..56fde6d44 100644 --- a/httemplate/pref/pref.html +++ b/httemplate/pref/pref.html @@ -1,5 +1,7 @@ <& /elements/header.html, mt('Preferences for [_1]', $FS::CurrentUser::CurrentUser->username) &> +% my $js_form_validate = { 'pref_form' => { 'name' => 'pref_form' } }; + <FORM METHOD="POST" NAME="pref_form" ACTION="pref-process.html"> <& /elements/error.html &> @@ -143,10 +145,14 @@ </TD> </TR> +% 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.'; + <TR> <TH ALIGN="right"><% emt("How many recent outbound emails to show in customer view") %></TH> <TD ALIGN="left" COLSPAN=2> - <INPUT TYPE="text" NAME="customer_view_emails" VALUE="<% $curuser->option('customer_view_emails') %>"></TD> + <INPUT TYPE="text" ID="<% $validate_field_cve %>" NAME="<% $validate_field_cve %>" VALUE="<% $curuser->option('customer_view_emails') %>"></TD> </TD> </TR> @@ -260,7 +266,11 @@ <INPUT TYPE="submit" VALUE="<% emt("Update preferences") %>"> -<&/elements/footer.html &> +% my %footerdata = ( +% 'formvalidation' => $js_form_validate, +% ); +<% include("/elements/footer.html", %footerdata) %> + <%init> my $curuser = $FS::CurrentUser::CurrentUser; |
