This commit is contained in:
2026-04-27 16:35:07 -06:00
parent 3c7be22019
commit cb4a210567
7 changed files with 701 additions and 376 deletions
+23 -4
View File
@@ -2,14 +2,33 @@
<div class="modal" onclick="event.stopPropagation()">
<div class="modal-header">
<h2>Rename Story</h2>
<button class="modal-close" onclick="this.closest('.modal-overlay').remove()">&times;</button>
<button
class="modal-close"
onclick="this.closest('.modal-overlay').remove()"
>
×
</button>
</div>
<form method="POST" action="/rooms/{{.RoomID}}/stories/{{.Story.ID}}/rename" class="auth-form">
<form
method="POST"
action="/rooms/{{.RoomID}}/stories/{{.Story.ID}}/rename"
hx-post="/rooms/{{.RoomID}}/stories/{{.Story.ID}}/rename"
hx-target="#stories-panel"
hx-swap="outerHTML"
hx-on::after-request="if (event.detail.successful) document.getElementById('modal-container').innerHTML = ''"
class="auth-form"
>
<div class="form-group">
<label class="form-label">Story Title</label>
<input class="form-input" type="text" name="title" value="{{.Story.Title}}" required />
<input
class="form-input"
type="text"
name="title"
value="{{.Story.Title}}"
required
/>
</div>
<button class="btn-primary" type="submit">Save</button>
<button class="btn-primary" type="submit">Save Changes</button>
</form>
</div>
</div>