diff options
Diffstat (limited to 'templates/mail/htmx/newmailbox.htmx.django')
| -rw-r--r-- | templates/mail/htmx/newmailbox.htmx.django | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/templates/mail/htmx/newmailbox.htmx.django b/templates/mail/htmx/newmailbox.htmx.django index 0962bea..ed886a4 100644 --- a/templates/mail/htmx/newmailbox.htmx.django +++ b/templates/mail/htmx/newmailbox.htmx.django @@ -1,4 +1,5 @@ -<h1 id="page-title" class="text-sm font-medium text-zinc-100" hx-swap-oob="true">{{ PageTitle }}</h1> +{% url "mail.index" as help_path %} +<h1 id="page-title" class="text-sm font-medium text-zinc-100 flex items-center gap-2" hx-swap-oob="true">{{ PageTitle }}<a href="{{ help_path }}" hx-get="{{ help_path }}" hx-target="#content" hx-swap="innerHTML" hx-push-url="true" class="text-zinc-600 hover:text-zinc-400 transition-colors duration-150"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z" /></svg></a></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]"> @@ -9,7 +10,34 @@ <form method="POST" action="{{ create_path }}" class="space-y-4"> <div> <label class="block text-xs font-medium text-zinc-400 mb-1.5 ml-1">Address</label> - <input type="email" name="address" required autocomplete="off" class="input-field"> + <div class="flex items-center gap-2"> + <input type="text" name="local_part" required autocomplete="off" placeholder="info" class="input-field flex-1"> + <span class="text-sm text-zinc-500">@</span> + <div class="dropdown flex-1" data-dropdown> + <input type="hidden" name="domain_id" data-dropdown-value> + <button type="button" class="input-field text-left flex items-center justify-between" data-dropdown-trigger> + <span class="truncate" data-dropdown-label>Select a domain</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 domains..." class="dropdown-search" data-dropdown-search> + </div> + <div class="dropdown-options" data-dropdown-options> + {% for domain in domains %} + <button type="button" class="dropdown-option" data-dropdown-option data-value="{{ domain.ID }}" data-label="{{ domain.Name }}.{{ domain.TLD.Name }}"> + <p class="text-sm text-zinc-200">{{ domain.Name }}.{{ domain.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 domains found</p> + </div> + </div> + </div> + </div> </div> <div> <label class="block text-xs font-medium text-zinc-400 mb-1.5 ml-1">Owner</label> |
