mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-06-09 22:14:43 +02:00
Fix issues from merge
This commit is contained in:
parent
8d3991614e
commit
dc7c782050
5 changed files with 45 additions and 32 deletions
|
@ -446,3 +446,14 @@ class RequirementsForm(RegistrarForm):
|
|||
),
|
||||
required=False, # use field validation to enforce this
|
||||
)
|
||||
|
||||
def clean_is_policy_acknowledged(self):
|
||||
"""This box must be checked to proceed but offer a clear error."""
|
||||
# already converted to a boolean
|
||||
is_acknowledged = self.cleaned_data["is_policy_acknowledged"]
|
||||
if not is_acknowledged:
|
||||
raise forms.ValidationError(
|
||||
"You must read and agree to the .gov domain requirements to proceed.",
|
||||
code="invalid",
|
||||
)
|
||||
return is_acknowledged
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<form class="usa-form usa-form--large" id="step__{{steps.current}}" method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
{% input_with_errors forms.0.form.current_site %}
|
||||
{% input_with_errors forms.0.current_site %}
|
||||
|
||||
{{ block.super }}
|
||||
|
||||
|
|
|
@ -28,23 +28,23 @@
|
|||
<p> This question is required. </p>
|
||||
{% csrf_token %}
|
||||
|
||||
{% if wizard.form.requested_domain.errors %}
|
||||
{% if forms.0.requested_domain.errors %}
|
||||
<div class="usa-form-group usa-form-group--error">
|
||||
{% for error in wizard.form.requested_domain.errors %}
|
||||
{% for error in forms.0.requested_domain.errors %}
|
||||
<span class="usa-error-message" id="input-error-message" role="alert">
|
||||
{{ error }}
|
||||
</span>
|
||||
{% endfor %}
|
||||
<div class="display-flex flex-align-center">
|
||||
<span class="padding-top-05 padding-right-2px">www.</span>
|
||||
{{ wizard.form.requested_domain|add_class:"usa-input usa-input--error"|attr:"aria-describedby:domain_instructions"|attr:"aria-invalid:true" }}
|
||||
{{ forms.0.requested_domain|add_class:"usa-input usa-input--error"|attr:"aria-describedby:domain_instructions"|attr:"aria-invalid:true" }}
|
||||
<span class="padding-top-05 padding-left-2px">.gov </span>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="display-flex flex-align-center">
|
||||
<span class="padding-top-05 padding-right-2px">www.</span>
|
||||
{{ wizard.form.requested_domain|add_class:"usa-input"|attr:"aria-describedby:domain_instructions" }}
|
||||
{{ forms.0.requested_domain|add_class:"usa-input"|attr:"aria-describedby:domain_instructions" }}
|
||||
<span class="padding-top-05 padding-left-2px">.gov </span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@ -53,25 +53,25 @@
|
|||
<h2>Alternative domains</h2>
|
||||
|
||||
<div>
|
||||
{% if wizard.form.alternative_domain.errors %}
|
||||
{% if forms.0.alternative_domain.errors %}
|
||||
<div class="usa-form-group usa-form-group--error">
|
||||
{{ wizard.form.alternative_domain|add_label_class:"usa-label usa-label--error" }}
|
||||
{% for error in wizard.for.alternative_domain.errors %}
|
||||
{{ forms.0.alternative_domain|add_label_class:"usa-label usa-label--error" }}
|
||||
{% for error in forms.0.alternative_domain.errors %}
|
||||
<span class="usa-error-message" id="input-error-message" role="alert">
|
||||
{{ error }}
|
||||
</span>
|
||||
{% endfor %}
|
||||
<div class="display-flex flex-align-center">
|
||||
<span class="padding-top-05 padding-right-2px">www.</span>
|
||||
{{ wizard.form.alternative_domain|add_class:"usa-input usa-input--error"|attr:"aria-describedby:domain_instructions"|attr:"aria-invalid:true" }}
|
||||
{ forms.0.alternative_domain|add_class:"usa-input usa-input--error"|attr:"aria-describedby:domain_instructions"|attr:"aria-invalid:true" }}
|
||||
<span class="padding-top-05 padding-left-2px">.gov </span>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
{{ wizard.form.alternative_domain|add_label_class:"usa-label" }}
|
||||
{{ forms.0.alternative_domain|add_label_class:"usa-label" }}
|
||||
<div class="display-flex flex-align-center">
|
||||
<span class="padding-top-05 padding-right-2px">www.</span>
|
||||
{{ wizard.form.alternative_domain|add_class:"usa-input"|attr:"aria-describedby:domain_instructions" }}
|
||||
{{ forms.0.alternative_domain|add_class:"usa-input"|attr:"aria-describedby:domain_instructions" }}
|
||||
<span class="padding-top-05 padding-left-2px">.gov </span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% for form in forms %}
|
||||
{% if form.errors %}
|
||||
{% for error in form.non_field_errors %}
|
||||
<div class="usa-alert usa-alert--error usa-alert--slim margin-bottom-2">
|
||||
|
@ -36,6 +37,7 @@
|
|||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<h1> {{form_titles|get_item:steps.current}} </h1>
|
||||
{% block form_content %}
|
||||
|
|
|
@ -10,19 +10,19 @@
|
|||
<form class="usa-form usa-form--large" id="step__{{steps.current}}" method="post" novalidate>
|
||||
{% csrf_token %}
|
||||
|
||||
{% if wizard.form.security_email.errors %}
|
||||
{% if forms.0.security_email.errors %}
|
||||
<div class="usa-form-group usa-form-group--error">
|
||||
{{ wizard.form.security_email|add_label_class:"usa-label usa-label--error" }}
|
||||
{% for error in wizard.form.security_email.errors %}
|
||||
{{ forms.0.security_email|add_label_class:"usa-label usa-label--error" }}
|
||||
{% for error in forms.0.security_email.errors %}
|
||||
<span class="usa-error-message" id="input-error-message" role="alert">
|
||||
{{ error }}
|
||||
</span>
|
||||
{% endfor %}
|
||||
{{ wizard.form.security_email|add_class:"usa-input"|add_class:"usa-input--error"|attr:"aria-describedby:instructions"|attr:"aria-invalid:true" }}
|
||||
{{ forms.0.security_email|add_class:"usa-input"|add_class:"usa-input--error"|attr:"aria-describedby:instructions"|attr:"aria-invalid:true" }}
|
||||
</div>
|
||||
{% else %}
|
||||
{{ wizard.form.security_email|add_label_class:"usa-label" }}
|
||||
{{ wizard.form.security_email|add_class:"usa-input"|attr:"aria-describedby:instructions" }}
|
||||
{{ forms.0.security_email|add_label_class:"usa-label" }}
|
||||
{{ forms.0.security_email|add_class:"usa-input"|attr:"aria-describedby:instructions" }}
|
||||
{% endif %}
|
||||
{{ block.super }}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue