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

View File

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