diff options
author | Mark Wells <mark@freeside.biz> | 2013-03-29 15:00:51 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2013-03-29 15:00:57 -0700 |
commit | 75ddd5240b233dd45f1d748f628e01238be0e751 (patch) | |
tree | 49f8005ab6efc3ad9b1f6683e790e3d74cf504c1 /httemplate | |
parent | 69dd6221a72aa22f38a3fb282e135c0e69d3c3fc (diff) |
"Edit Location" should standardize, #13763, #14717
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/edit/cust_location.cgi | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/httemplate/edit/cust_location.cgi b/httemplate/edit/cust_location.cgi index 80b27c2b3..a5e7d209e 100755 --- a/httemplate/edit/cust_location.cgi +++ b/httemplate/edit/cust_location.cgi @@ -7,20 +7,28 @@ ACTION="<% $p %>edit/process/cust_location.cgi" METHOD=POST> <INPUT TYPE="hidden" NAME="locationnum" VALUE="<% $locationnum %>"> <% ntable('#cccccc') %> -<% include('/elements/location.html', +<& /elements/location.html, 'object' => $cust_location, 'no_asterisks' => 1, - ) %> +&> +<& /elements/standardize_locations.html, + 'form' => 'EditLocationForm', + 'callback' => 'document.EditLocationForm.submit();', +&> </TABLE> <BR> <SCRIPT TYPE="text/javascript"> -function areyousure() { - return confirm('Modify this service location?'); +function go() { +% if ( FS::Conf->new->config('address_standardize_method') ) { + standardize_locations(); +% } else { + confirm('Modify this service location?') && + document.EditLocationForm.submit(); +% } } </SCRIPT> -<INPUT TYPE="submit" VALUE="Submit" onclick="return areyousure()"> - +<INPUT TYPE="button" NAME="submitButton" VALUE="Submit" onclick="go()"> </FORM> </BODY> </HTML> |