From 9359f6281a46b86f421e4ec02ce1f90e4ac2dbd7 Mon Sep 17 00:00:00 2001 From: MS Date: Thu, 15 Oct 2020 23:27:10 +0200 Subject: payto wire transfer moving the form to a different page --- talerbank/app/templates/payto_wiretransfer.html | 50 +++++++++++++++++++++++++ talerbank/app/templates/profile_page.html | 20 +--------- talerbank/app/urls.py | 1 + talerbank/app/views.py | 8 ++++ 4 files changed, 60 insertions(+), 19 deletions(-) create mode 100644 talerbank/app/templates/payto_wiretransfer.html diff --git a/talerbank/app/templates/payto_wiretransfer.html b/talerbank/app/templates/payto_wiretransfer.html new file mode 100644 index 0000000..6acfee5 --- /dev/null +++ b/talerbank/app/templates/payto_wiretransfer.html @@ -0,0 +1,50 @@ +{% extends "base.html" %} +{# + This file is part of GNU TALER. + Copyright (C) 2014, 2015, 2016 Taler Systems SA + + TALER is free software; you can redistribute it and/or modify it under the + terms of the GNU Lesser General Public License as published by the Free Software + Foundation; either version 2.1, or (at your option) any later version. + + TALER is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along with + TALER; see the file COPYING. If not, see + + @author Marcello Stanisci + @author Florian Dold +#} + +{% block headermsg %} +
+ [Logout]
+
+{% endblock headermsg %} +{% block content %} +
+
+
+

Wire transfer

+

Transfer money via the payto system: +
+
+ payto://x-taler-bank/[bank-hostname]/[account-number]?subject=[subject]&amount=[{{ currency }}:X.Y] +

+
+ + + +
+
+
+
+{% endblock %} diff --git a/talerbank/app/templates/profile_page.html b/talerbank/app/templates/profile_page.html index ed1e62f..0c5e4f8 100644 --- a/talerbank/app/templates/profile_page.html +++ b/talerbank/app/templates/profile_page.html @@ -71,25 +71,7 @@
-
-

Wire transfer

-

Transfer money via the payto system: -
-
- payto://x-taler-bank/[bank-hostname]/[account-number]?subject=[subject]&amount=[{{ currency }}:X.Y] -

-
- - - -
-
+ Wire money

Transactions for {{ name }}

diff --git a/talerbank/app/urls.py b/talerbank/app/urls.py index f3018c3..07f2464 100644 --- a/talerbank/app/urls.py +++ b/talerbank/app/urls.py @@ -118,6 +118,7 @@ urlpatterns = [ path("logout", views.logout_view, name="logout"), path("register", views.register, name="register"), path("profile", views.profile_page, name="profile"), + path("payto-form", views.payto_form, name="payto-form"), path("history", views.serve_history, name="history"), path("public-accounts", views.serve_public_accounts, name="public-accounts"), diff --git a/talerbank/app/views.py b/talerbank/app/views.py index 1855609..ecb0ec7 100644 --- a/talerbank/app/views.py +++ b/talerbank/app/views.py @@ -297,6 +297,14 @@ class InputDatalist(forms.TextInput): class PaytoTransferForm(forms.Form): address = forms.CharField() + +@login_required +def payto_form(request): + context = dict( + currency=request.user.bankaccount.balance.amount.currency, + ) + return render(request, "payto_wiretransfer.html", context) + ## # This method serves the profile page, which is the main # page where the user interacts with the bank, and also the -- cgit v1.2.3