mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-26 01:04:00 -04:00
Merge pull request #4265 from alphagov/fix-service-url-support-ticket
Fix relative URLs appearing in support tickets
This commit is contained in:
@@ -114,17 +114,10 @@ def feedback(ticket_type):
|
|||||||
if form.validate_on_submit():
|
if form.validate_on_submit():
|
||||||
user_email = form.email_address.data
|
user_email = form.email_address.data
|
||||||
user_name = form.name.data or None
|
user_name = form.name.data or None
|
||||||
if current_service:
|
|
||||||
service_string = 'Service: "{name}"\n{url}\n'.format(
|
|
||||||
name=current_service.name,
|
|
||||||
url=url_for('main.service_dashboard', service_id=current_service.id)
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
service_string = ''
|
|
||||||
|
|
||||||
feedback_msg = '{}\n{}'.format(
|
feedback_msg = render_template(
|
||||||
form.feedback.data,
|
'support-tickets/support-ticket.txt',
|
||||||
service_string,
|
content=form.feedback.data,
|
||||||
)
|
)
|
||||||
|
|
||||||
ticket = NotifySupportTicket(
|
ticket = NotifySupportTicket(
|
||||||
|
|||||||
5
app/templates/support-tickets/support-ticket.txt
Normal file
5
app/templates/support-tickets/support-ticket.txt
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{{ content }}
|
||||||
|
{% if current_service -%}
|
||||||
|
Service: "{{ current_service.name }}"
|
||||||
|
{{ url_for('main.service_dashboard', service_id=current_service.id, _external=True) }}
|
||||||
|
{% endif %}
|
||||||
@@ -237,6 +237,7 @@ def test_passes_user_details_through_flow(
|
|||||||
url_for(
|
url_for(
|
||||||
'main.service_dashboard',
|
'main.service_dashboard',
|
||||||
service_id=SERVICE_ONE_ID,
|
service_id=SERVICE_ONE_ID,
|
||||||
|
_external=True,
|
||||||
),
|
),
|
||||||
''
|
''
|
||||||
])
|
])
|
||||||
|
|||||||
Reference in New Issue
Block a user