Fix old Matcha dialog

This commit is contained in:
2025-03-06 11:31:52 +01:00
parent 796f0ee351
commit cb964988d4
2 changed files with 32 additions and 27 deletions

View File

@@ -1,29 +1,34 @@
<div id="modal" x-data> <div id="modify_modal" x-data="{modal: null}">
<div class="overlay" style="z-index: 30"></div> <dialog class="modal" x-ref="modal" x-init="$refs.modal.showModal()" @close="$refs.modal.remove()">
<dialog open style="z-index: 31"> <div class="modal-box">
<header> <h3 class="text-lg font-bold pb-2">Modify RSS Feed subscription</h3>
<h2>Modify RSS Feed subscription</h2> <form method="dialog">
</header> <button class="btn btn-sm btn-circle btn-ghost absolute right-2 top-2"></button>
</form>
<form id="modify_form" hx-put="/feed/{{feed.id}}" hx-target="#feed_{{feed.id}}" hx-swap="outerHTML" <form id="modify_form" hx-put="/feed/{{feed.id}}" hx-target="#feed_{{feed.id}}" hx-swap="outerHTML"
hx-indicator="#mod_indicator" hx-indicator="#mod_indicator"
@htmx:after-on-load="document.getElementById('modal').remove()"> @htmx:after-on-load="$refs.modal.close()">
<label> <fieldset class="fieldset gap-2">
Name <label class="floating-label">
<input type="text" name="name" value="{{feed.name}}"> <span>Name</span>
<input type="text" name="name" value="{{feed.name}}" class="input input-md w-full" placeholder="Name">
</label> </label>
<label> <label class="floating-label">
Feed URL <span>Feed URL</span>
<input type="url" name="feed_url" value="{{feed.feed_url}}"> <input type="url" name="feed_url" value="{{feed.feed_url}}" class="input input-md w-full" placeholder="Feed URL">
</label> </label>
</form> </fieldset>
<footer> <div class="modal-action">
<button class="btn" form="modify_form" type="reset" @click="document.getElementById('modal').remove()">Close <button class="btn btn-primary" form="modify_form" type="submit">
</button>
<button class="btn" form="modify_form" type="submit">
Submit Submit
<img id="mod_indicator" class="htmx-indicator" src="/assets/oval.svg" <img id="mod_indicator" class="htmx-inline htmx-indicator" src="/assets/oval.svg"
style="height: 1rem; margin-left: 2px" alt="..."> style="height: 1rem; margin-left: 2px" alt="...">
</button> </button>
</footer> </div>
</form>
</div>
<form method="dialog" class="modal-backdrop">
<button>close</button>
</form>
</dialog> </dialog>
</div> </div>

View File

@@ -35,7 +35,7 @@
</label> </label>
</fieldset> </fieldset>
<div class="modal-action"> <div class="modal-action">
<button class="btn btn-primary" form="create_form" type="submit"> <button class="btn btn-primary" type="submit">
Submit Submit
<img id="indicator" class="htmx-inline htmx-indicator" src="/assets/oval.svg" <img id="indicator" class="htmx-inline htmx-indicator" src="/assets/oval.svg"
style="height: 1rem; margin-left: 2px" style="height: 1rem; margin-left: 2px"