lingo: callback_url is not displayed as a link (#56646)
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-09-30 17:10:15 +02:00
parent 2a26f13c94
commit 013248d96e
No known key found for this signature in database
GPG Key ID: 1FAB9B9B4F93D473
3 changed files with 12 additions and 6 deletions

View File

@ -12,7 +12,7 @@
{% block content %}
<form method="post" enctype="multipart/form-data">
{% if object.id and callback_url %}
<p><label>{% trans "Callback URL:" %}</label> <a href="{{ callback_url }}">{{ callback_url }}</a></p>
<p><label>{% trans "Callback URL:" %}</label> {{ callback_url }}</p>
{% endif %}
{% csrf_token %}
{{ form.as_p }}

View File

@ -12,7 +12,7 @@
{% block content %}
<form method="post" enctype="multipart/form-data">
{% if object.id and callback_url %}
<p><label>{% trans "Callback URL:" %}</label> <a href="{{ callback_url }}">{{ callback_url }}</a></p>
<p><label>{% trans "Callback URL:" %}</label> {{ callback_url }}</p>
{% endif %}
{% csrf_token %}
{{ form.as_p }}

View File

@ -69,8 +69,11 @@ def test_edit_regie(app, admin_user, payment_backend):
assert '/manage/lingo/regies/' in resp.text
# callback URL is shown
assert 'Callback URL' in resp
assert 'http://testserver/lingo/callback-payment-backend/%s/' % payment_backend.slug in resp
assert (
'<p><label>Callback URL:</label> http://testserver/lingo/callback-payment-backend/%s/</p>'
% payment_backend.slug
in resp
)
resp.forms[0]['description'] = 'other description'
resp = resp.forms[0].submit()
@ -636,8 +639,11 @@ def test_edit_payment_backend(app, admin_user):
assert '/manage/lingo/paymentbackends/' in resp.text
# callback URL is shown
assert 'Callback URL' in resp
assert 'http://testserver/lingo/callback-payment-backend/%s' % payment_backend.slug in resp
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