treasuredb/templates/account/upsert.html.ep

44 lines
1.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

% title $id ? "Account $id" : "Create account";
% my %r;
% $r{ID} = begin
<input id="ID" name="ID" value="<%= $account->ID %>">
% end
% $r{name} = begin
<input id="name" name="name" value="<%= $account->name %>">
% end
% $r{type} = begin
<input id="type" name="type" value="<%= $account->type %>"> (Currently there: <%= join(", ", @$types) %>)
% end
% $r{altId} = begin
<input id="altId" name="altId" value="<%= $account->altId %>">
% end
% $r{IBAN} = begin
<input id="IBAN" name="IBAN" value="<%= $account->IBAN %>"> (may also be empty or '*' s. help)
% end
<form action="<%= url_for %>" method="post">
<dl class="upsert">
% for my $f ( $account->result_source->columns ) {
% my $renderer = $r{$f} // do {
% my $value = $account->$f // next;
% begin
<%= $value %>
% end
% };
<dt><label for="<%= $f %>"><%= $f %>: </label></dt>
<dd><%= $renderer->() %></dd>
% }
</dl>
<button type="submit">Submit</button>
</form>
% my $help = begin
<p><strong>What to input into "IBAN"?</strong> To restrict outgoing payments from that account to a certain bank account, insert its account number. To allow outgoing payment to any bank account, input wildcard (*). To disallow outgoing payment from that account, input nothing.</p>
<p>When inserting a proper number, this number must be included in all outgoing payments from that account. Outgoing payments differ from internal payments in that transferCredit is undefined.</p>
% end
% stash help => $help;