wcs: append /tryauth to links to forms (#8448)

This commit is contained in:
Frédéric Péters 2015-09-30 22:06:59 +02:00
parent 79d34f71ae
commit 9764fdfd8a
3 changed files with 5 additions and 3 deletions

View File

@ -1 +1 @@
<div class="wcs-form-{{slug}}"><a href="{{ url }}">{{ title }}</a></div>
<div class="wcs-form-{{slug}}"><a href="{{ url }}tryauth">{{ title }}</a></div>

View File

@ -3,7 +3,7 @@
{{ description|safe }}
<ul>
{% for form in forms %}
<li><a href="{{ form.url }}">{{ form.title }}</a></li>
<li><a href="{{ form.url }}tryauth">{{ form.title }}</a></li>
{% endfor %}
</ul>
</div>

View File

@ -209,7 +209,7 @@ def test_form_cell_render():
cell.formdef_reference = u'default:form-title'
cell.save()
result = cell.render(Context())
assert 'http://127.0.0.1:8999/form-title/' in result
assert 'http://127.0.0.1:8999/form-title/tryauth' in result
assert 'form title' in result
@wcsctl_present
@ -291,6 +291,8 @@ def test_forms_of_category_cell_render():
result = cell.render(Context({'synchronous': True}))
assert 'form title' in result and 'a second form title' in result
assert result.index('form title') > result.index('a second form title')
assert 'http://127.0.0.1:8999/form-title/tryauth' in result
assert 'http://127.0.0.1:8999/a-second-form-title/tryauth' in result
cell.ordering = 'popularity'
cell.save()