Basic button

This commit is contained in:
zandercymatics 2024-02-02 15:39:51 -07:00
parent 2891391382
commit b3401d8bfc
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 3 additions and 1 deletions

View file

@ -1134,7 +1134,7 @@ class DomainAdmin(ListHeaderAdmin):
"_edit_domain": self.do_edit_domain, "_edit_domain": self.do_edit_domain,
"_delete_domain": self.do_delete_domain, "_delete_domain": self.do_delete_domain,
"_get_status": self.do_get_status, "_get_status": self.do_get_status,
"_extend_expiration_date": self.do_extend_expiration_date "_extend_expiration_date": self.do_extend_expiration_date,
} }
# Check which action button was pressed and call the corresponding function # Check which action button was pressed and call the corresponding function
@ -1152,6 +1152,7 @@ class DomainAdmin(ListHeaderAdmin):
# We do not want to accidentally delete records. # We do not want to accidentally delete records.
self.message_user(request, "Object is not of type Domain", messages.ERROR) self.message_user(request, "Object is not of type Domain", messages.ERROR)
return None return None
try: try:
obj.renew_domain(date_to_extend=date.today()) obj.renew_domain(date_to_extend=date.today())
except Exception as err: except Exception as err:

View file

@ -5,6 +5,7 @@
<div class="submit-row"> <div class="submit-row">
<input id="manageDomainSubmitButton" type="submit" value="Manage domain" name="_edit_domain"> <input id="manageDomainSubmitButton" type="submit" value="Manage domain" name="_edit_domain">
<input type="submit" value="Get registry status" name="_get_status"> <input type="submit" value="Get registry status" name="_get_status">
<input type="submit" value="Extend expiration date" name="_extend_expiration_date">
<div class="spacer"></div> <div class="spacer"></div>
{% if original.state == original.State.READY %} {% if original.state == original.State.READY %}
<input type="submit" value="Place hold" name="_place_client_hold" class="custom-link-button"> <input type="submit" value="Place hold" name="_place_client_hold" class="custom-link-button">