diff --git a/src/registrar/assets/js/get-gov.js b/src/registrar/assets/js/get-gov.js index 4c9f8f25f..48996badb 100644 --- a/src/registrar/assets/js/get-gov.js +++ b/src/registrar/assets/js/get-gov.js @@ -230,6 +230,12 @@ function handleValidationClick(e) { })(); +/** + * An IIFE that attaches a click handler for our dynamic nameservers form + * + * Only does something on a single page, but it should be fast enough to run + * it everywhere. + */ (function prepareForms() { let serverForm = document.querySelectorAll(".server-form") let container = document.querySelector("#form-container") @@ -257,4 +263,3 @@ function handleValidationClick(e) { totalForms.setAttribute('value', `${formNum+1}`) } })(); - diff --git a/src/registrar/models/domain.py b/src/registrar/models/domain.py index 1302be808..8e1aa3ace 100644 --- a/src/registrar/models/domain.py +++ b/src/registrar/models/domain.py @@ -218,7 +218,7 @@ class Domain(TimeStampedModel): def __str__(self) -> str: return self.name - def nameservers(self): + def nameservers(self) -> List[str]: """A list of the nameservers for this domain. TODO: call EPP to get this info instead of returning fake data. diff --git a/src/registrar/templates/domain_nameservers.html b/src/registrar/templates/domain_nameservers.html index 141e9225f..5f5662236 100644 --- a/src/registrar/templates/domain_nameservers.html +++ b/src/registrar/templates/domain_nameservers.html @@ -4,6 +4,11 @@ {% block title %}Domain name servers | {{ domain.name }} | {% endblock %} {% block domain_content %} + {# this is right after the messages block in the parent template #} + {% for form in formset %} + {% include "includes/form_errors.html" with form=form %} + {% endfor %} +

Domain name servers

Before your domain can be used we'll need information about your domain @@ -19,7 +24,7 @@ {% for form in formset %}

- {% with sublabel_text="Example: ns"|concat:forloop.counter|concat:".nameserver.com" %} + {% with sublabel_text="Example: ns"|concat:forloop.counter|concat:".example.com" %} {% if forloop.counter <= 2 %} {% with attr_required=True %} {% input_with_errors form.server %} @@ -31,7 +36,7 @@
{% endfor %} -