mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-18 15:34:16 +02:00
move required fields display in ds data and nameservers
This commit is contained in:
parent
443abedd74
commit
c375656f9d
2 changed files with 100 additions and 97 deletions
|
@ -274,64 +274,66 @@
|
|||
DS records defined on the domain.
|
||||
{% endcomment %}
|
||||
|
||||
<section class="add-dsdata-form display-none section-outlined">
|
||||
<div class="add-dsdata-form display-none">
|
||||
{% include "includes/required_fields.html" %}
|
||||
<form class="usa-form usa-form--extra-large" method="post" novalidate>
|
||||
<h2>Add DS record</h2>
|
||||
{% csrf_token %}
|
||||
{{ formset.management_form }}
|
||||
{% for form in formset %}
|
||||
<div class="repeatable-form">
|
||||
<div class="grid-row grid-gap-2 flex-end">
|
||||
<div class="tablet:grid-col-4">
|
||||
{% with sublabel_text="Numbers (0-9) only." %}
|
||||
{% with attr_required=True add_initial_value_attr=True add_group_class="usa-form-group--unstyled-error" %}
|
||||
{% input_with_errors form.key_tag %}
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
<div class="tablet:grid-col-4">
|
||||
{% with attr_required=True add_initial_value_attr=True add_group_class="usa-form-group--unstyled-error" %}
|
||||
{% input_with_errors form.algorithm %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
<div class="tablet:grid-col-4">
|
||||
{% with attr_required=True add_initial_value_attr=True add_group_class="usa-form-group--unstyled-error" %}
|
||||
{% input_with_errors form.digest_type %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="grid-col">
|
||||
{% with sublabel_text="Numbers (0-9) and letters (a-f) only. SHA-1: 40 chars, SHA-256: 64 chars." %}
|
||||
{% with hide_character_count=True %}
|
||||
<section class="section-outlined">
|
||||
<form class="usa-form usa-form--extra-large" method="post" novalidate>
|
||||
<h2>Add DS record</h2>
|
||||
{% csrf_token %}
|
||||
{{ formset.management_form }}
|
||||
{% for form in formset %}
|
||||
<div class="repeatable-form">
|
||||
<div class="grid-row grid-gap-2 flex-end">
|
||||
<div class="tablet:grid-col-4">
|
||||
{% with sublabel_text="Numbers (0-9) only." %}
|
||||
{% with attr_required=True add_initial_value_attr=True add_group_class="usa-form-group--unstyled-error" %}
|
||||
{% input_with_errors form.digest %}
|
||||
{% input_with_errors form.key_tag %}
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
<div class="tablet:grid-col-4">
|
||||
{% with attr_required=True add_initial_value_attr=True add_group_class="usa-form-group--unstyled-error" %}
|
||||
{% input_with_errors form.algorithm %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
<div class="tablet:grid-col-4">
|
||||
{% with attr_required=True add_initial_value_attr=True add_group_class="usa-form-group--unstyled-error" %}
|
||||
{% input_with_errors form.digest_type %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="grid-col">
|
||||
{% with sublabel_text="Numbers (0-9) and letters (a-f) only. SHA-1: 40 chars, SHA-256: 64 chars." %}
|
||||
{% with hide_character_count=True %}
|
||||
{% with attr_required=True add_initial_value_attr=True add_group_class="usa-form-group--unstyled-error" %}
|
||||
{% input_with_errors form.digest %}
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<div class="margin-top-2">
|
||||
<button
|
||||
type="button"
|
||||
class="usa-button usa-button--outline dsdata-cancel-add-form"
|
||||
name="btn-cancel-click"
|
||||
aria-label="Reset the data in the DS records to the registry state (undo changes)"
|
||||
>Cancel
|
||||
</button>
|
||||
<button
|
||||
id="save-ds-data"
|
||||
type="submit"
|
||||
class="usa-button"
|
||||
>Save
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
{% endfor %}
|
||||
<div class="margin-top-2">
|
||||
<button
|
||||
type="button"
|
||||
class="usa-button usa-button--outline dsdata-cancel-add-form"
|
||||
name="btn-cancel-click"
|
||||
aria-label="Reset the data in the DS records to the registry state (undo changes)"
|
||||
>Cancel
|
||||
</button>
|
||||
<button
|
||||
id="save-ds-data"
|
||||
type="submit"
|
||||
class="usa-button"
|
||||
>Save
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<a
|
||||
|
|
|
@ -240,57 +240,58 @@
|
|||
This section renders Add New Nameservers form which renders when there are no existing
|
||||
nameservers defined on the domain.
|
||||
{% endcomment %}
|
||||
|
||||
<section class="add-nameservers-form display-none section-outlined">
|
||||
<div class="add-nameservers-form display-none">
|
||||
{% include "includes/required_fields.html" %}
|
||||
<form class="usa-form usa-form--extra-large" method="post" novalidate>
|
||||
<h2>Add name servers</h2>
|
||||
{% csrf_token %}
|
||||
{{ formset.management_form }}
|
||||
{% for form in formset %}
|
||||
{{ form.domain }}
|
||||
<div class="repeatable-form">
|
||||
<div class="grid-row grid-gap-2 flex-end minh-143px">
|
||||
<div class="tablet:grid-col-6">
|
||||
{% with sublabel_text="Example: ns"|concat:forloop.counter|concat:".example.com" add_group_class="usa-form-group--unstyled-error margin-top-2" %}
|
||||
{% if forloop.counter <= 2 %}
|
||||
{# span_for_text will wrap the copy in s <span>, which we'll use in the JS for this component #}
|
||||
{% with attr_required=True add_initial_value_attr=True span_for_text=True %}
|
||||
{% input_with_errors form.server %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
{% with span_for_text=True add_initial_value_attr=True %}
|
||||
{% input_with_errors form.server %}
|
||||
<section class="section-outlined">
|
||||
<form class="usa-form usa-form--extra-large" method="post" novalidate>
|
||||
<h2>Add name servers</h2>
|
||||
{% csrf_token %}
|
||||
{{ formset.management_form }}
|
||||
{% for form in formset %}
|
||||
{{ form.domain }}
|
||||
<div class="repeatable-form">
|
||||
<div class="grid-row grid-gap-2 flex-end minh-143px">
|
||||
<div class="tablet:grid-col-6">
|
||||
{% with sublabel_text="Example: ns"|concat:forloop.counter|concat:".example.com" add_group_class="usa-form-group--unstyled-error margin-top-2" %}
|
||||
{% if forloop.counter <= 2 %}
|
||||
{# span_for_text will wrap the copy in s <span>, which we'll use in the JS for this component #}
|
||||
{% with attr_required=True add_initial_value_attr=True span_for_text=True %}
|
||||
{% input_with_errors form.server %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
<div class="tablet:grid-col-6">
|
||||
{% with attr_required=True add_initial_value_attr=True label_text=form.ip.label sublabel_text="Example: 86.124.49.54 or 2001:db8::1234:5678" add_aria_label="Name server "|concat:forloop.counter|concat:" "|concat:form.ip.label add_group_class="usa-form-group--unstyled-error margin-top-2" %}
|
||||
{% input_with_errors form.ip %}
|
||||
{% endwith %}
|
||||
{% else %}
|
||||
{% with span_for_text=True add_initial_value_attr=True %}
|
||||
{% input_with_errors form.server %}
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
<div class="tablet:grid-col-6">
|
||||
{% with attr_required=True add_initial_value_attr=True label_text=form.ip.label sublabel_text="Example: 86.124.49.54 or 2001:db8::1234:5678" add_aria_label="Name server "|concat:forloop.counter|concat:" "|concat:form.ip.label add_group_class="usa-form-group--unstyled-error margin-top-2" %}
|
||||
{% input_with_errors form.ip %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
<div class="margin-top-2">
|
||||
<button
|
||||
type="button"
|
||||
class="usa-button usa-button--outline nameserver-cancel-add-form"
|
||||
name="btn-cancel-click"
|
||||
aria-label="Reset the data in the name server form to the registry state (undo changes)"
|
||||
>Cancel
|
||||
</button>
|
||||
<button
|
||||
type="submit"
|
||||
class="usa-button"
|
||||
>Save
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="margin-top-2">
|
||||
<button
|
||||
type="button"
|
||||
class="usa-button usa-button--outline nameserver-cancel-add-form"
|
||||
name="btn-cancel-click"
|
||||
aria-label="Reset the data in the name server form to the registry state (undo changes)"
|
||||
>Cancel
|
||||
</button>
|
||||
<button
|
||||
type="submit"
|
||||
class="usa-button"
|
||||
>Save
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue