mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-18 10:29:23 +02:00
Removing post form for certain situations
This commit is contained in:
parent
5faf480e3e
commit
707e5a21ea
3 changed files with 13 additions and 11 deletions
|
@ -21,8 +21,5 @@
|
||||||
"http://localhost:8080/request/requirements/",
|
"http://localhost:8080/request/requirements/",
|
||||||
"http://localhost:8080/request/finished/",
|
"http://localhost:8080/request/finished/",
|
||||||
"http://localhost:8080/user-profile/"
|
"http://localhost:8080/user-profile/"
|
||||||
],
|
|
||||||
"ignore": [
|
|
||||||
"WCAG2AA.Principle2.Guideline2_2.2_2_1.H91"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,12 +18,18 @@
|
||||||
|
|
||||||
<div class="usa-modal__footer">
|
<div class="usa-modal__footer">
|
||||||
<ul class="usa-button-group">
|
<ul class="usa-button-group">
|
||||||
|
{% if not_form %}
|
||||||
|
<li class="usa-button-group__item">
|
||||||
|
{{ modal_button }}
|
||||||
|
</li>
|
||||||
|
{% else %}
|
||||||
<li class="usa-button-group__item">
|
<li class="usa-button-group__item">
|
||||||
<form method="post">
|
<form method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ modal_button }}
|
{{ modal_button }}
|
||||||
</form>
|
</form>
|
||||||
</li>
|
</li>
|
||||||
|
{% endif %}
|
||||||
<li class="usa-button-group__item">
|
<li class="usa-button-group__item">
|
||||||
{% comment %} The cancel button the DS form actually triggers a context change in the view,
|
{% comment %} The cancel button the DS form actually triggers a context change in the view,
|
||||||
in addition to being a close modal hook {% endcomment %}
|
in addition to being a close modal hook {% endcomment %}
|
||||||
|
|
|
@ -386,6 +386,7 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
|
||||||
if DomainRequest._form_complete(self.domain_request):
|
if DomainRequest._form_complete(self.domain_request):
|
||||||
modal_button = '<button type="submit" ' 'class="usa-button" ' ">Submit request</button>"
|
modal_button = '<button type="submit" ' 'class="usa-button" ' ">Submit request</button>"
|
||||||
context_stuff = {
|
context_stuff = {
|
||||||
|
"not_form": False,
|
||||||
"form_titles": self.TITLES,
|
"form_titles": self.TITLES,
|
||||||
"steps": self.steps,
|
"steps": self.steps,
|
||||||
"visited": self.storage.get("step_history", []),
|
"visited": self.storage.get("step_history", []),
|
||||||
|
@ -401,11 +402,9 @@ class DomainRequestWizard(DomainRequestWizardPermissionView, TemplateView):
|
||||||
"user": self.request.user,
|
"user": self.request.user,
|
||||||
}
|
}
|
||||||
else: # form is not complete
|
else: # form is not complete
|
||||||
modal_button = (
|
modal_button = '<button type="button" class="usa-button" data-close-modal>Return to request</button>'
|
||||||
"<!-- pa11y-ignore-next-line WCAG2AA.Principle2.Guideline2_2.2_2_1.H91 -->"
|
|
||||||
'<button type="button" class="usa-button" data-close-modal>Return to request</button>'
|
|
||||||
)
|
|
||||||
context_stuff = {
|
context_stuff = {
|
||||||
|
"not_form": True,
|
||||||
"form_titles": self.TITLES,
|
"form_titles": self.TITLES,
|
||||||
"steps": self.steps,
|
"steps": self.steps,
|
||||||
"visited": self.storage.get("step_history", []),
|
"visited": self.storage.get("step_history", []),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue