diff options
Diffstat (limited to 'httemplate/misc')
| -rw-r--r-- | httemplate/misc/confirm-address_standardize.html | 24 | ||||
| -rw-r--r-- | httemplate/misc/confirm-censustract.html | 4 | ||||
| -rw-r--r-- | httemplate/misc/email-customers.html | 4 | ||||
| -rw-r--r-- | httemplate/misc/xmlhttp-validate_password.html | 25 |
4 files changed, 31 insertions, 26 deletions
diff --git a/httemplate/misc/confirm-address_standardize.html b/httemplate/misc/confirm-address_standardize.html index 0a05c70bd..9d1a5c135 100644 --- a/httemplate/misc/confirm-address_standardize.html +++ b/httemplate/misc/confirm-address_standardize.html @@ -34,18 +34,18 @@ Confirm address standardization </TR> <TR> % if ( $old{$pre.'company'} ) { - <TD><% $old{$pre.'company'} %></TD> + <TD><% $old{$pre.'company'} |h %></TD> % } </TR> <TR> - <TD><% $old{$pre.'address1'} %></TD> + <TD><% $old{$pre.'address1'} |h %></TD> <TD ROWSPAN=3><FONT COLOR="#ff0000"><B><% $new{$pre.'error'} %></B></FONT></TD> </TR> <TR> - <TD><% $old{$pre.'address2'} %></TD> + <TD><% $old{$pre.'address2'} |h %></TD> </TR> <TR> - <TD><% $old{$pre.'city'} %>, <% $old{$pre.'state'} %> <% $old{$pre.'zip'} %></TD> + <TD><% $old{$pre.'city'} |h %>, <% $old{$pre.'state'} |h %> <% $old{$pre.'zip'} |h %></TD> </TR> % } else { # not an error % $rows++ if !$new{$pre.'addr_clean'}; @@ -68,21 +68,21 @@ Confirm address standardization <TR> % if ( $old{$pre.'company'} ) { <TR> - <TD><% $old{$pre.'company'} %></TD> - <TD><% $new{$pre.'company'} %></TD> + <TD><% $old{$pre.'company'} |h %></TD> + <TD><% $new{$pre.'company'} |h %></TD> </TR> % } <TR> - <TD><% $old{$pre.'address1'} %></TD> - <TD><% $new{$pre.'address1'} %></TD> + <TD><% $old{$pre.'address1'} |h %></TD> + <TD><% $new{$pre.'address1'} |h %></TD> </TR> <TR> - <TD><% $old{$pre.'address2'} %></TD> - <TD><% $new{$pre.'address2'} %></TD> + <TD><% $old{$pre.'address2'} |h %></TD> + <TD><% $new{$pre.'address2'} |h %></TD> </TR> <TR> - <TD><% $old{$pre.'city'} %>, <% $old{$pre.'state'} %> <% $old{$pre.'zip'} %></TD> - <TD><% $new{$pre.'city'} %>, <% $new{$pre.'state'} %> <% $new{$pre.'zip'} %></TD> + <TD><% $old{$pre.'city'} |h %>, <% $old{$pre.'state'} |h %> <% $old{$pre.'zip'} |h %></TD> + <TD><% $new{$pre.'city'} |h %>, <% $new{$pre.'state'} |h %> <% $new{$pre.'zip'} |h %></TD> </TR> % } # if error diff --git a/httemplate/misc/confirm-censustract.html b/httemplate/misc/confirm-censustract.html index 024bc17c4..10ae91812 100644 --- a/httemplate/misc/confirm-censustract.html +++ b/httemplate/misc/confirm-censustract.html @@ -13,8 +13,8 @@ Census tract error Confirm census tract % } </B><BR> -<% $location{address1} %> <% $location{address2} %><BR> -<% $location{city} %>, <% $location{state} %> <% $location{zip} %><BR> +<% $location{address1} |h %> <% $location{address2} |h %><BR> +<% $location{city} |h %>, <% $location{state} |h %> <% $location{zip} |h %><BR> <BR> % my $querystring = "census_year=$year&latitude=".$cache->get('latitude').'&longitude='.$cache->get('longitude'); <A HREF="http://maps.ffiec.gov/FFIECMapper/TGMapSrv.aspx?<% $querystring %>" diff --git a/httemplate/misc/email-customers.html b/httemplate/misc/email-customers.html index 09ff93cca..cd4c92f23 100644 --- a/httemplate/misc/email-customers.html +++ b/httemplate/misc/email-customers.html @@ -80,14 +80,14 @@ should be used to set msgnum or from/subject/html_body cgi params <% include('/elements/tr-fixed.html', 'field' => 'from', 'label' => 'From:', - 'value' => scalar( $from ), + 'value' => $from, ) %> <% include('/elements/tr-fixed.html', 'field' => 'subject', 'label' => 'Subject:', - 'value' => scalar( $subject ), + 'value' => $subject, ) %> diff --git a/httemplate/misc/xmlhttp-validate_password.html b/httemplate/misc/xmlhttp-validate_password.html index 28dbf6460..1efb4aaa3 100644 --- a/httemplate/misc/xmlhttp-validate_password.html +++ b/httemplate/misc/xmlhttp-validate_password.html @@ -1,13 +1,14 @@ <%doc> -Requires cgi params 'password' (plaintext) and 'sub' ('validate_password' is only -acceptable value.) Also accepts 'svcnum' (for svc_acct, will otherwise create an -empty dummy svc_acct) and 'fieldid' (for html post-processing, passed along in -results for convenience.) - -Returns a json-encoded hashref with keys of 'valid' (set to 1 if object is valid), -'error' (error text if password is invalid) or 'syserror' (error text if password -could not be validated.) Only one of these keys will be set. Will also set -'fieldid' if it was passed. +Requires cgi params 'password' (plaintext) and 'sub' ('validate_password' is +only acceptable value.) Also accepts 'svcnum' (for svc_acct, will otherwise +create an empty dummy svc_acct), 'pkgnum' (for when the svc_acct isn't yet +inserted), and 'fieldid' (for html post-processing, passed along in results +for convenience.) + +Returns a json-encoded hashref with keys of 'valid' (set to 1 if object is +valid), 'error' (error text if password is invalid) or 'syserror' (error text +if password could not be validated.) Only one of these keys will be set. +Will also set 'fieldid' if it was passed. </%doc> <% encode_json($result) %> @@ -32,9 +33,13 @@ my $validate_password = sub { $result{'syserror'} = 'Invalid svcnum' unless $svcnum =~ /^\d*$/; return \%result if $result{'syserror'}; + my $pkgnum = $arg{'pkgnum'}; + $result{'syserror'} = 'Invalid pkgnum' unless $pkgnum =~ /^\d*$/; + return \%result if $result{'syserror'}; + my $svc_acct = $svcnum ? qsearchs('svc_acct',{'svcnum' => $svcnum}) - : (new FS::svc_acct {}); + : FS::svc_acct->new({ 'pkgnum' => $pkgnum }); $result{'syserror'} = 'Could not find service' unless $svc_acct; return \%result if $result{'syserror'}; |
