mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-25 12:08:40 +02:00
changes
This commit is contained in:
parent
1f109bd040
commit
e1ebdbac3f
2 changed files with 15 additions and 3 deletions
|
@ -50,7 +50,18 @@
|
|||
<form class="usa-form usa-form--extra-large nameservers-form" method="post" novalidate id="form-container">
|
||||
{% csrf_token %}
|
||||
{{ formset.management_form }}
|
||||
|
||||
{% for form in formset %}
|
||||
<fieldset class="usa-fieldset">
|
||||
<label class="usa-label" for="given-name">Name server {{forloop.counter}} </label>
|
||||
<div class="usa-hint" id="gnHint">Example: ns{{forloop.counter}}.example.com</div>
|
||||
<input
|
||||
class="usa-input usa-input--xl"
|
||||
id="given-name"
|
||||
name="first-name"
|
||||
aria-describedby="gnHint"
|
||||
/>
|
||||
</form>
|
||||
{% endfor %}
|
||||
<!--
|
||||
if no data in formset:
|
||||
build 2 blank forms
|
||||
|
|
|
@ -757,8 +757,9 @@ class DomainNameserversView(DomainFormBaseView):
|
|||
initial_data.extend({"server": name, "ip": ",".join(ip)} for name, ip in nameservers)
|
||||
|
||||
# Ensure at least 3 fields, filled or empty
|
||||
while len(initial_data) < 2:
|
||||
initial_data.append({})
|
||||
if len(initial_data) == 0:
|
||||
while len(initial_data) < 2:
|
||||
initial_data.append({})
|
||||
|
||||
return initial_data
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue