From f4b7e899fa106cd2941aa8a1f2465993fe00600b Mon Sep 17 00:00:00 2001 From: Timothy Hobbs Date: Thu, 19 Aug 2021 20:45:51 +0200 Subject: [PATCH] Change query arg delimiter from ; to & --- docs/integration.rst | 2 +- helpdesk/templates/helpdesk/kb_category_base.html | 2 +- helpdesk/tests/test_kb.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/integration.rst b/docs/integration.rst index 159fde81..5f131a90 100644 --- a/docs/integration.rst +++ b/docs/integration.rst @@ -13,6 +13,6 @@ There is also a page under the url `/tickets/submit_iframe/` with the same behav Fields may be hidden by adding them to a comma separated `_hide_fieds_` query parameter. -Here is an example url to get you started: `http://localhost:8000/desk/tickets/submit_iframe/?queue=1;custom_dpnk-user=http://lol.cz;submitter_email=foo@bar.cz;title=lol;_hide_fields_=title,queue,submitter_email`. This url sets the queue to 1, sets the custom field `dpnk-url` to `http://lol.cz` and submitter_email to `lol@baz.cz` and hides the title, queue, and submitter_email fields. Note that hidden fields should be set to a default. +Here is an example url to get you started: `http://localhost:8000/desk/tickets/submit_iframe/?queue=1&custom_dpnk-user=http://lol.cz;submitter_email=foo@bar.cz&title=lol&_hide_fields_=title,queue,submitter_email`. This url sets the queue to 1, sets the custom field `dpnk-url` to `http://lol.cz` and submitter_email to `lol@baz.cz` and hides the title, queue, and submitter_email fields. Note that hidden fields should be set to a default. Note that these fields will continue to be user-editable despite being pre-filled. diff --git a/helpdesk/templates/helpdesk/kb_category_base.html b/helpdesk/templates/helpdesk/kb_category_base.html index b576d083..0384388a 100644 --- a/helpdesk/templates/helpdesk/kb_category_base.html +++ b/helpdesk/templates/helpdesk/kb_category_base.html @@ -35,7 +35,7 @@ {% endif %} - +
{% trans 'Create New Ticket' %}{% trans " Queue: " %}{{item}}
diff --git a/helpdesk/tests/test_kb.py b/helpdesk/tests/test_kb.py index 68c709ef..4827baae 100644 --- a/helpdesk/tests/test_kb.py +++ b/helpdesk/tests/test_kb.py @@ -74,7 +74,7 @@ class KBTests(TestCase): self.assertContains(response, '0 people found this answer useful of 1') def test_kb_category_iframe(self): - cat_url = reverse('helpdesk:kb_category', args=("test_cat",)) + "?kbitem=1;submitter_email=foo@bar.cz;title=lol;" + cat_url = reverse('helpdesk:kb_category', args=("test_cat",)) + "?kbitem=1&submitter_email=foo@bar.cz&title=lol&" response = self.client.get(cat_url) # Assert that query params are passed on to ticket submit form - self.assertContains(response, "'/helpdesk/tickets/submit/?queue=1;_readonly_fields_=queue;kbitem=1;submitter_email=foo%40bar.cz&title=lol") + self.assertContains(response, "'/helpdesk/tickets/submit/?queue=1&_readonly_fields_=queue&kbitem=1&submitter_email=foo%40bar.cz&title=lol")