diff options
Diffstat (limited to 'templates/domains/htmx/editdomain.htmx.django')
| -rw-r--r-- | templates/domains/htmx/editdomain.htmx.django | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/templates/domains/htmx/editdomain.htmx.django b/templates/domains/htmx/editdomain.htmx.django new file mode 100644 index 0000000..f26dbce --- /dev/null +++ b/templates/domains/htmx/editdomain.htmx.django @@ -0,0 +1,49 @@ +<h1 id="page-title" class="text-sm font-medium text-zinc-100" hx-swap-oob="true">{{ PageTitle }}</h1> +<div class="slide-up flex items-start justify-center pt-12"> + <div class="glass rounded-xl glow-border w-full max-w-lg"> + <div class="px-5 py-4 border-b border-white/[0.04]"> + <h2 class="text-sm font-medium text-zinc-200">Edit Domain</h2> + </div> + <div class="p-5"> + {% url "domains.manage.update" id=domain.ID as update_path %} + <form hx-put="{{ update_path }}" hx-swap="none" class="space-y-4"> + <div> + <label class="block text-xs font-medium text-zinc-400 mb-1.5 ml-1">Domain Name</label> + <input type="text" name="name" value="{{ domain.Name }}" required autocomplete="off" class="input-field"> + </div> + <div> + <label class="block text-xs font-medium text-zinc-400 mb-1.5 ml-1">TLD</label> + <div class="dropdown" data-dropdown> + <input type="hidden" name="tld_name" value="{{ domain.TLD.Name }}" data-dropdown-value> + <button type="button" data-dropdown-trigger class="input-field text-left flex items-center justify-between"> + <span class="truncate" data-dropdown-label>.{{ domain.TLD.Name }}</span> + <svg class="w-4 h-4 text-zinc-500 shrink-0 ml-2 transition-transform duration-150" data-dropdown-chevron fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="1.5"> + <path stroke-linecap="round" stroke-linejoin="round" d="m19.5 8.25-7.5 7.5-7.5-7.5" /> + </svg> + </button> + <div class="dropdown-menu" data-dropdown-menu> + <div class="p-2 border-b border-white/[0.04]"> + <input type="text" placeholder="Search TLDs..." class="dropdown-search" data-dropdown-search> + </div> + <div class="dropdown-options" data-dropdown-options> + {% for tld in tlds %} + <button type="button" class="dropdown-option" data-dropdown-option data-value="{{ tld.Name }}" data-label=".{{ tld.Name }}"> + <p class="text-sm text-zinc-200">.{{ tld.Name }}</p> + </button> + {% endfor %} + </div> + <div class="dropdown-empty hidden" data-dropdown-empty> + <p class="text-xs text-zinc-500 text-center py-3">No TLDs found</p> + </div> + </div> + </div> + </div> + <div class="flex items-center gap-3 pt-2"> + <button type="submit" class="btn-primary">Save Changes</button> + {% url "domains.manage" as domains_path %} + <a href="{{ domains_path }}" hx-get="{{ domains_path }}" hx-target="#content" hx-swap="innerHTML" hx-push-url="true" class="text-xs text-zinc-500 hover:text-zinc-300 transition-colors duration-150">Cancel</a> + </div> + </form> + </div> + </div> +</div>
\ No newline at end of file |
