Deposit method instructions are now part of the prompt

This hides the instructions if the answer is already given in the input line.
This commit is contained in:
Juerd Waalboer 2018-07-22 22:56:57 +02:00
parent 2fbc833011
commit 5c16008038
2 changed files with 4 additions and 4 deletions

View file

@ -26,9 +26,9 @@ sub amount :Tab(13.37,42) {
$self->{amount} = parse_amount($amount)
or return REJECT, "Invalid amount";
call_hooks("deposit_methods", $self->{deposit_methods} = {});
call_hooks("deposit_methods", \my $message, $self->{deposit_methods} = {});
return "How are we receiving this EUR $amount?", \&how
return $message . "How are we receiving this EUR $amount?", \&how
if keys %{ $self->{deposit_methods} };
$cart->add(undef, +$self->{amount}, "Deposit", { is_deposit => 1 });

View file

@ -3,9 +3,9 @@
sub command { NEXT }
sub hook_deposit_methods {
my ($class, $hash) = @_;
my ($class, $message, $hash) = @_;
print <<"END";
$$message = <<"END";
Please type one of the following: