summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-07-10 05:37:44 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-07-10 05:37:44 +0000
commit00c92a41fb134790d8a1f3132ebe50d9dd41a978 (patch)
tree3d985dcd4bc97f40f241171fe76d6a182a23628e /bin
parent4a07e174e74e2b707ecf9bf308917ad689e9f317 (diff)
Fine-tuning changes to draft approval workflow
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2204 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'bin')
-rw-r--r--bin/aa.pl12
1 files changed, 11 insertions, 1 deletions
diff --git a/bin/aa.pl b/bin/aa.pl
index e9f827df..7a79fde5 100644
--- a/bin/aa.pl
+++ b/bin/aa.pl
@@ -958,7 +958,17 @@ sub approve {
my $draft = LedgerSMB::DBObject::Draft->new({base => $lsmb});
$draft->approve();
- $form->info($locale->text('Draft Posted'));
+ if ($form->{callback}){
+ print "Location: $form->{callback}\n";
+ print "Status: 302 Found\n\n";
+ print "<html><body>";
+ my $url = $form->{callback};
+ print qq|If you are not redirected automatically, click <a href="$url">|
+ . qq|here</a>.</body></html>|;
+
+ } else {
+ $form->info($locale->text('Draft Posted'));
+ }
}
sub update {