diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-12-04 10:37:16 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-12-04 10:37:16 -0800 |
commit | 8dd41f364aaba88969dfd0908feb22709025e7f6 (patch) | |
tree | 471cb3796019d873da648413d88ca70a657414ed /httemplate/edit/cust_main | |
parent | a2df4ef9575be1ae2f1f5b9089f121316f796bac (diff) | |
parent | bf50a8356a7344b4f75c7bc7f952019b98867f26 (diff) |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/edit/cust_main')
-rw-r--r-- | httemplate/edit/cust_main/bottomfixup.js | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/httemplate/edit/cust_main/bottomfixup.js b/httemplate/edit/cust_main/bottomfixup.js index 5a8835f53..6a9deb92a 100644 --- a/httemplate/edit/cust_main/bottomfixup.js +++ b/httemplate/edit/cust_main/bottomfixup.js @@ -100,14 +100,13 @@ function copyelement(from, to) { //alert(from + " (" + from.type + "): " + to.name + " => " + to.value); } -% # the value in pre+'censustract' is the confirmed censustract; if it's set, -% # and the user hasn't changed it manually, skip this +% # the value in pre+'censustract' is the confirmed censustract (either from +% # the previous saved record, or from address standardization (if the backend +% # supports it), or from an aborted previous submit. only need to reconfirm +% # if it's empty. function confirm_censustract(pre) { var cf = document.CustomerForm; - if ( cf.elements[pre+'censustract'].value == '' || - cf.elements[pre+'enter_censustract'].value != - cf.elements[pre+'censustract'].value ) - { + if ( cf.elements[pre+'censustract'].value == '' ) { var address_info = form_address_info(); address_info[pre+'latitude'] = cf.elements[pre+'latitude'].value; address_info[pre+'longitude'] = cf.elements[pre+'longitude'].value; @@ -116,10 +115,13 @@ function confirm_censustract(pre) { '<%$p%>/misc/confirm-censustract.html', 'q=' + encodeURIComponent(JSON.stringify(address_info)), function() { - overlib( OLresponseAJAX, CAPTION, 'Confirm censustract', STICKY, - AUTOSTATUSCAP, CLOSETEXT, '', MIDX, 0, MIDY, 0, DRAGGABLE, WIDTH, - 576, HEIGHT, 268, BGCOLOR, '#333399', CGCOLOR, '#333399', - TEXTSIZE, 3 ); + if ( OLresponseAJAX ) { + overlib( OLresponseAJAX, CAPTION, 'Confirm censustract', STICKY, + AUTOSTATUSCAP, CLOSETEXT, '', MIDX, 0, MIDY, 0, DRAGGABLE, WIDTH, + 576, HEIGHT, 268, BGCOLOR, '#333399', CGCOLOR, '#333399', + TEXTSIZE, 3 ); + } else + submit_continue(); }, 0); } else submit_continue(); |