mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 10:53:28 -05: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():
|
||||
user_email = form.email_address.data
|
||||
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(
|
||||
form.feedback.data,
|
||||
service_string,
|
||||
feedback_msg = render_template(
|
||||
'support-tickets/support-ticket.txt',
|
||||
content=form.feedback.data,
|
||||
)
|
||||
|
||||
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(
|
||||
'main.service_dashboard',
|
||||
service_id=SERVICE_ONE_ID,
|
||||
_external=True,
|
||||
),
|
||||
''
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user