Remove unused classes and comments

This commit is contained in:
Rebecca Hsieh 2024-01-24 13:53:45 -08:00
parent fd53cc9241
commit e3fc608202
No known key found for this signature in database
3 changed files with 9 additions and 8 deletions

View file

@ -210,7 +210,7 @@ function handleValidationClick(e) {
const attribute = e.target.getAttribute("validate-for") || ""; const attribute = e.target.getAttribute("validate-for") || "";
if (!attribute.length) return; if (!attribute.length) return;
const input = document.getElementById(attribute); // You might need to define 'attribute' const input = document.getElementById(attribute);
runValidators(input); runValidators(input);
} }

View file

@ -173,12 +173,13 @@ class Domain(TimeStampedModel, DomainHelper):
@classmethod @classmethod
def available(cls, domain: str) -> bool: def available(cls, domain: str) -> bool:
"""Check if a domain is available.""" return True
if not cls.string_could_be_domain(domain): # """Check if a domain is available."""
raise ValueError("Not a valid domain: %s" % str(domain)) # if not cls.string_could_be_domain(domain):
domain_name = domain.lower() # raise ValueError("Not a valid domain: %s" % str(domain))
req = commands.CheckDomain([domain_name]) # domain_name = domain.lower()
return registry.send(req, cleaned=True).res_data[0].avail # req = commands.CheckDomain([domain_name])
# return registry.send(req, cleaned=True).res_data[0].avail
@classmethod @classmethod
def registered(cls, domain: str) -> bool: def registered(cls, domain: str) -> bool:

View file

@ -48,7 +48,6 @@
{% endwith %} {% endwith %}
{% endwith %} {% endwith %}
<button <button
id="check-availability-for-dotgov-domain"
type="button" type="button"
class="usa-button usa-button--outline" class="usa-button usa-button--outline"
validate-for="{{ forms.0.requested_domain.auto_id }}" validate-for="{{ forms.0.requested_domain.auto_id }}"
@ -87,6 +86,7 @@
id="check-avail-for-alt-domains" id="check-avail-for-alt-domains"
type="button" type="button"
class="usa-button usa-button--outline" class="usa-button usa-button--outline"
validate-for="{{ forms.1.requested_domain.auto_id }}"
>Check availability</button> >Check availability</button>
</div> </div>