diff options
author | Ivan Kohler <ivan@freeside.biz> | 2016-11-11 13:13:17 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2016-11-11 13:13:17 -0800 |
commit | d6216f073a9a729d3265741d3aea4f4ade1c6a7f (patch) | |
tree | ff47c2ca8564a96defa099582e2ce770c423fbd1 /httemplate/elements | |
parent | 3f8bffa5344295cacf11249fdb6f6f958f939fb8 (diff) |
UX: acknowledge bill now instead of silently redirecting
Diffstat (limited to 'httemplate/elements')
-rw-r--r-- | httemplate/elements/bill.html | 7 | ||||
-rw-r--r-- | httemplate/elements/progress-init.html | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/httemplate/elements/bill.html b/httemplate/elements/bill.html index 420a7489b..6ba8b7e60 100644 --- a/httemplate/elements/bill.html +++ b/httemplate/elements/bill.html @@ -28,7 +28,7 @@ Example: $formname, [ 'custnum', @opt_keys ], $p.'misc/bill.cgi', - $url ? { url => $url } : { message => $message }, + \%args, $formname, # use it as 'key' ) %> <A HREF="javascript:void(0);" onclick="javascript:<%$formname%>process();"><%$label%></A> @@ -46,10 +46,11 @@ my $label = $opt{'label'}; # need one and it needs to be unique my $formname = $opt{'formname'} || 'bill'.sprintf('%04d',random_id(4)).$custnum; -my $url = $opt{'url'} || ''; -my $message = $opt{'message'} || 'Finished!'; my $bill_opts = $opt{'bill_opts'} || {}; my @opt_keys = keys(%$bill_opts); my @opt_vals = values(%$bill_opts); +my %args = ( 'message' => $opt{'message'} || mt('Customer billed') ); +$args{url} = $opt{url} if $opt{url}; + </%init> diff --git a/httemplate/elements/progress-init.html b/httemplate/elements/progress-init.html index 0c2b8165a..789825cc5 100644 --- a/httemplate/elements/progress-init.html +++ b/httemplate/elements/progress-init.html @@ -13,8 +13,7 @@ In misc/something.html: #or { message => 'Finished!' }, #or { url => $p.'where_to_go.html', message => 'Finished' }, - # which displays the message, then waits for confirmation before - # redirecting to the URL. + # which recirects to the URL and displays the message as a status #or { popup_url => $p.'popup_contents.html' } # which loads that URL into the popup after completion #or { url => $p.'where_to_go.html', @@ -96,7 +95,7 @@ function <%$key%>process () { document.<%$formname%>.submit.disabled=true; } - overlib( 'Submitting job to server...', WIDTH, 444, HEIGHT, 168, CAPTION, 'Please wait...', STICKY, AUTOSTATUSCAP, CLOSETEXT, '', CLOSECLICK, MIDX, 0, MIDY, 0 ); + overlib( 'Submitting job to server...', WIDTH, 444, HEIGHT, 168, CAPTION, 'Please wait...', STICKY, AUTOSTATUSCAP, CLOSETEXT, '', CLOSECLICK, MIDX, 0, MIDY, 0, TEXTPADDING, 0, BASE, 0, BGCOLOR, '#333399', CGCOLOR, '#333399', FGCOLOR, '#f8f8f8' ); // jQuery .serializeArray() maybe? var copy_fields = <% encode_json(\%copy_fields) %>; @@ -140,7 +139,7 @@ function <%$key%>myCallback( jobnum ) { var url = <% $progress_url->as_string |js_string %>; url = url.replace('_JOBNUM_', jobnum); - overlib( OLiframeContent(url, 444, 168, '<% $popup_name %>'), CAPTION, 'Please wait...', STICKY, AUTOSTATUSCAP, CLOSETEXT, '', CLOSECLICK, MIDX, 0, MIDY, 0 ); + overlib( OLiframeContent(url, 444, 168, '<% $popup_name %>', 0), CAPTION, 'Please wait...', STICKY, AUTOSTATUSCAP, CLOSETEXT, '', CLOSECLICK, MIDX, 0, MIDY, 0, TEXTPADDING, 0, BASE, 0, BGCOLOR, '#333399', CGCOLOR, '#333399', FGCOLOR, '#f8f8f8' ); } |