lingo: remove callback_url on backend page (#56650)
gitea-wip/combo/pipeline/head There was a failure building this commit Details
gitea/combo/pipeline/head Build started... Details

This commit is contained in:
Lauréline Guérin 2021-10-01 11:01:32 +02:00
parent a191ea942b
commit aa85ec295a
No known key found for this signature in database
GPG Key ID: 1FAB9B9B4F93D473
3 changed files with 0 additions and 15 deletions

View File

@ -79,11 +79,6 @@ class PaymentBackendUpdateView(UpdateView):
form_class = PaymentBackendForm
success_url = reverse_lazy('lingo-manager-paymentbackend-list')
def get_context_data(self, **kwargs):
ctx = super().get_context_data(**kwargs)
ctx['callback_url'] = self.request.build_absolute_uri(self.object.callback_url)
return ctx
class PaymentBackendDeleteView(DeleteView):
model = PaymentBackend

View File

@ -11,9 +11,6 @@
{% block content %}
<form method="post" enctype="multipart/form-data">
{% if object.id and callback_url %}
<p><label>{% trans "Callback URL:" %}</label> {{ callback_url }}</p>
{% endif %}
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">

View File

@ -662,13 +662,6 @@ def test_edit_payment_backend(app, admin_user):
resp = app.get('/manage/lingo/paymentbackends/%s/edit' % payment_backend.pk, status=200)
assert '/manage/lingo/paymentbackends/' in resp.text
# callback URL is shown
assert (
'<p><label>Callback URL:</label> http://testserver/lingo/callback-payment-backend/%s/</p>'
% payment_backend.slug
in resp
)
# service cannot be changed
assert 'disabled' in resp.form['service'].attrs