Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in arnold justifications #3212

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/nav/web/arnold/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __init__(self, *args, **kwargs):
fieldset_legend = 'Edit detention reason'

self.attrs = set_flat_form_attributes(
form_action='arnold-justificatons',
form_action='arnold-justifications',
form_fields=[
FlatFieldset(
fieldset_legend,
Expand Down
6 changes: 3 additions & 3 deletions python/nav/web/arnold/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@
views.render_edit_detention_profile,
name="arnold-detention-profile-edit",
),
re_path(r"^addreason/$", views.render_justifications, name="arnold-justificatons"),
re_path(r"^addreason/$", views.render_justifications, name="arnold-justifications"),
re_path(
r"^addreason/edit/(?P<jid>\d+)$",
views.render_justifications,
name="arnold-justificatons-edit",
name="arnold-justifications-edit",
),
re_path(
r"^addreason/delete/(?P<jid>\d+)$",
views.delete_justification,
name="arnold-justificatons-delete",
name="arnold-justifications-delete",
),
re_path(
r"^addquarantinevlan/$",
Expand Down
6 changes: 3 additions & 3 deletions python/nav/web/arnold/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def render_justifications(request, jid=None):
form = JustificationForm(request.POST)
if form.is_valid():
process_justification_form(form)
return redirect('arnold-justificatons')
return redirect('arnold-justifications')
elif jid:
justification = Justification.objects.get(pk=jid)
form = JustificationForm(
Expand Down Expand Up @@ -214,11 +214,11 @@ def delete_justification(_request, jid):
except Justification.DoesNotExist:
# As this method is only called from ui on existing justifications
# this should not happen. Just redirect to list again
return redirect('arnold-justificatons')
return redirect('arnold-justifications')
else:
justification.delete()

return redirect('arnold-justificatons')
return redirect('arnold-justifications')


def render_manual_detention_step_one(request):
Expand Down
4 changes: 2 additions & 2 deletions python/nav/web/templates/arnold/justifications.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
<td>{{ justification.name }}</td>
<td>{{ justification.description }}</td>
<td>
<a href="{% url 'arnold-justificatons-edit' justification.id %}"
<a href="{% url 'arnold-justifications-edit' justification.id %}"
class="button tiny secondary">
Edit
</a>
</td>
<td>
{% if justification.deletable %}
<a href="{% url 'arnold-justificatons-delete' justification.id %}"
<a href="{% url 'arnold-justifications-delete' justification.id %}"
class="button tiny alert">
Delete
</a>
Expand Down
2 changes: 1 addition & 1 deletion python/nav/web/templates/arnold/tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</li>
{# <li class="{{ active.search|yesno:"tabactive," }}"><a href="{% url 'arnold-search' %}">Search</a></li>#}
<li class="{{ active.justifications|yesno:"tabactive," }}">
<a href="{% url 'arnold-justificatons' %}">Detention reasons</a>
<a href="{% url 'arnold-justifications' %}">Detention reasons</a>
</li>
{# <li class="{{ active.manualdetention|yesno:"tabactive," }}">#}
{# <a href="{% url 'arnold-manual-detention' %}">Manual detention</a>#}
Expand Down
Loading