Skip to content

Commit

Permalink
ugly temporary fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pyDez committed Sep 30, 2024
1 parent 547f574 commit f306114
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
8 changes: 8 additions & 0 deletions envergo/pages/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ class HomeAmenagementView(MoulinetteMixin, FormView):
class HomeHaieView(MoulinetteMixin, FormView):
template_name = "haie/pages/home.html"

# TODO remove: temporary fix waiting for ticket GUHv1.3
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
return {
"from_home": True,
**context,
}


class GeometriciansView(MoulinetteMixin, FormView):
template_name = "pages/geometricians.html"
Expand Down
9 changes: 8 additions & 1 deletion envergo/templates/haie/moulinette/form.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@
{% include '_form_header.html' with form=form %}

<!-- Include current query parameters as hidden fields to keep Triage inputs -->
{% for key, value in request.GET.items %}<input type="hidden" name="{{ key }}" value="{{ value }}">{% endfor %}
{% for key, value in request.GET.items %}<input type="hidden" name="{{ key }}" value="{{ value }}" />{% endfor %}

<!-- TODO remove: temporary fix waiting for ticket GUHv1.3 -->
{% if from_home %}
<input type="hidden" name="department" value="36" />
<input type="hidden" name="element" value="haie" />
<input type="hidden" name="travaux" value="arrachage" />
{% endif %}

<div class="form-section">
{% include '_radio_snippet.html' with field=form.profil %}
Expand Down

0 comments on commit f306114

Please sign in to comment.