diff options
| author | winter | 2025-03-16 02:04:04 +0000 |
|---|---|---|
| committer | winter | 2025-03-16 02:04:04 +0000 |
| commit | dd4d47bde45d20954129ba256696bf12c3826cdd (patch) | |
| tree | 83029bead8fbd1fe7206961b8d0145b1400f6f38 /templates/note | |
| parent | 23ddb01a20788da2c98c4d5bb9bd271ceff532c8 (diff) | |
fix hx-target everywhere :<
Diffstat (limited to 'templates/note')
| -rw-r--r-- | templates/note/reply_form.php | 3 | ||||
| -rw-r--r-- | templates/note/write_form.php | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/templates/note/reply_form.php b/templates/note/reply_form.php index 2d8cfc3..cd67ce8 100644 --- a/templates/note/reply_form.php +++ b/templates/note/reply_form.php @@ -23,7 +23,8 @@ $selectedScope = $note->privacy->scope->value; ?> <form class="noteReplyForm" id="replyForm-<?= $note->id ?>" _="on submit send toggle to previous <button.reply/> then wait 1s then trigger update on #liveTimelineUpdater on toggle or submit toggle @hidden" - hidden hx-post="/fragment/note/<?= $note->id ?>/reply" hx-disabled-elt="find button" hx-swap="outerHTML"> + hidden hx-post="/fragment/note/<?= $note->id ?>/reply" hx-disabled-elt="find button" hx-swap="outerHTML" + hx-target="this"> <div class="row summaryAndContent"> <label for="replyContent-<?= $note->id ?>"><?= __('writeReply.label') ?></label> <input type="text" id="replySummary-<?= $note->id ?>" name="summary" autocomplete="off" diff --git a/templates/note/write_form.php b/templates/note/write_form.php index add00ec..f7b0b06 100644 --- a/templates/note/write_form.php +++ b/templates/note/write_form.php @@ -3,11 +3,11 @@ <input hidden type="file" name="file" id="noteAttachmentFile" _="on change send submit to closest <form/>"> </form> -<form id="writeNoteForm" action="/todo" method="post" hx-post="/fragment/note" hx-swap="outerHTML" +<form id="writeNoteForm" action="/todo" method="post" hx-post="/fragment/note" hx-swap="outerHTML" hx-target="this" hx-disabled-elt="find button" _="on submit wait 1s then trigger update on #liveTimelineUpdater" <?= ($_SERVER['REQUEST_METHOD'] == 'GET') ? 'hx-preserve' : '' ?>> <div class="row miniProfile"> - <a href="/@/<?= $actor->handle ?>"> + <a href="/@/<?= $actor->handle ?>" hx-target="#centrePane" hx-swap="outerHTML show:window:top"> <?php call_template('actor/avatar', ['actor' => $actor]); ?> </a> <div class="basicInfo"> |
