mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-06 01:35:22 +02:00
Remove unused classes and comments
This commit is contained in:
parent
fd53cc9241
commit
e3fc608202
3 changed files with 9 additions and 8 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue