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") || "";
if (!attribute.length) return;
const input = document.getElementById(attribute); // You might need to define 'attribute'
const input = document.getElementById(attribute);
runValidators(input);
}

View file

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

View file

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