aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/actor
diff options
context:
space:
mode:
Diffstat (limited to 'templates/actor')
-rw-r--r--templates/actor/profile_block_button.php2
-rw-r--r--templates/actor/profile_editable.php3
-rw-r--r--templates/actor/profile_follow_button.php2
-rw-r--r--templates/actor/profile_poke_form.php3
-rw-r--r--templates/actor/profile_reset_avatar.php2
5 files changed, 7 insertions, 5 deletions
diff --git a/templates/actor/profile_block_button.php b/templates/actor/profile_block_button.php
index 1b71613..98ed438 100644
--- a/templates/actor/profile_block_button.php
+++ b/templates/actor/profile_block_button.php
@@ -3,7 +3,7 @@ $blocks = $user->actor->blocks($actor);
$action = $blocks ? 'unblock' : 'block';
?>
<button hx-confirm="<?= __("user.profile.$action.confirm") ?>" hx-post="/fragment/actor/<?= $actor->id ?>/blockButton"
- hx-swap="outerHTML">
+ hx-swap="outerHTML" hx-target="this">
<span class="material-symbols <?= $blocks ? 'remove' : 'block' ?>"></span>
<span><?= __("user.profile.$action") ?></span>
</button> \ No newline at end of file
diff --git a/templates/actor/profile_editable.php b/templates/actor/profile_editable.php
index fc969bd..f4318fd 100644
--- a/templates/actor/profile_editable.php
+++ b/templates/actor/profile_editable.php
@@ -1,4 +1,5 @@
-<form class="fullProfile" hx-post="/fragment/profile" hx-swap="outerHTML" enctype="multipart/form-data">
+<form class="fullProfile" hx-post="/fragment/profile" hx-swap="outerHTML" hx-target="this"
+ enctype="multipart/form-data">
<div class="basicInfo">
<?php call_template('actor/avatar', ['actor' => $actor]); ?>
<div>
diff --git a/templates/actor/profile_follow_button.php b/templates/actor/profile_follow_button.php
index e2b314d..a99656c 100644
--- a/templates/actor/profile_follow_button.php
+++ b/templates/actor/profile_follow_button.php
@@ -10,7 +10,7 @@ $state = match ($relation?->status) {
};
?>
<button class="<?= $state == 'active' ? 'secondary' : 'primary' ?>"
- hx-post="/fragment/actor/<?= $actor->id ?>/followButton" hx-swap="outerHTML" <?= $state == 'pending' ? 'disabled' : '' ?> hx-disabled-elt="this">
+ hx-post="/fragment/actor/<?= $actor->id ?>/followButton" hx-swap="outerHTML" <?= $state == 'pending' ? 'disabled' : '' ?> hx-target="this" hx-disabled-elt="this">
<?= __(match ($state) {
'active' => 'user.profile.unfollow.action',
'pending' => 'user.profile.follow.pending',
diff --git a/templates/actor/profile_poke_form.php b/templates/actor/profile_poke_form.php
index 7dcc360..df511ef 100644
--- a/templates/actor/profile_poke_form.php
+++ b/templates/actor/profile_poke_form.php
@@ -1,5 +1,6 @@
<?php /** @var \Digitigrade\Model\Actor $actor */ ?>
-<form class="nobackground pokeForm" hx-post="/fragment/actor/<?= $actor->id ?>/poke" hx-disabled-elt="find button">
+<form class="nobackground pokeForm" hx-post="/fragment/actor/<?= $actor->id ?>/poke" hx-disabled-elt="find button"
+ hx-target="this" hx-swap="outerHTML">
<div class="row">
<div class="column">
<select id="pokeVerb-<?= $actor->id ?>" name="verb">
diff --git a/templates/actor/profile_reset_avatar.php b/templates/actor/profile_reset_avatar.php
index 86a3507..5eb0a68 100644
--- a/templates/actor/profile_reset_avatar.php
+++ b/templates/actor/profile_reset_avatar.php
@@ -1,3 +1,3 @@
-<button type="button" class="secondary inline" hx-post="/fragment/profile/resetAvatar" <?= ($reset ?? false) ? 'disabled' : '' ?>>
+<button type="button" class="secondary inline" hx-post="/fragment/profile/resetAvatar" <?= ($reset ?? false) ? 'disabled' : '' ?> hx-target="this">
<?= __(($reset ?? false) ? 'user.profile.avatarReset' : 'user.profile.resetAvatar') ?>
</button> \ No newline at end of file