aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/note/reply_form.php
diff options
context:
space:
mode:
Diffstat (limited to 'templates/note/reply_form.php')
-rw-r--r--templates/note/reply_form.php37
1 files changed, 26 insertions, 11 deletions
diff --git a/templates/note/reply_form.php b/templates/note/reply_form.php
index 1f84133..37b24b0 100644
--- a/templates/note/reply_form.php
+++ b/templates/note/reply_form.php
@@ -14,12 +14,13 @@ if ($note->summary) {
}
$scopeOptions = match ($note->privacy->scope) {
- NotePrivacyScope::NONE => ['none'],
- NotePrivacyScope::MUTUALS => ['none', 'mutuals'],
- NotePrivacyScope::FOLLOWERS => ['none', 'mutuals', 'followers'],
- default => ['none', 'mutuals', 'followers', 'public']
+ NotePrivacyScope::NONE => ['none' => 'lock'],
+ NotePrivacyScope::MUTUALS => ['none' => 'lock', 'mutuals' => 'group'],
+ NotePrivacyScope::FOLLOWERS => ['none' => 'lock', 'mutuals' => 'group', 'followers' => 'groups'],
+ default => ['none' => 'lock', 'mutuals' => 'group', 'followers' => 'groups', 'public' => 'public']
};
$selectedScope = $note->privacy->scope->value;
+$selectedInteractors = $note->privacy->canReply->value;
?>
<form class="noteReplyForm" id="replyForm-<?= $note->id ?>" _="
on htmx:afterOnLoad if event.detail.elt is me
@@ -49,14 +50,28 @@ $selectedScope = $note->privacy->scope->value;
<?php call_template('user_mention_pill'); ?>
</div>
<div class="row">
- <label for="replyScope-<?= $note->id ?>"><?= __('writeNote.scope.label') ?></label>
- <select name="scope" id="replyScope-<?= $note->id ?>" required autocomplete="off">
- <?php foreach ($scopeOptions as $s): ?>
- <option value="<?= $s ?>" <?= $selectedScope == $s ? 'selected' : '' ?>>
- <?= __("note.privacy.scope.$s") ?>
- </option>
+ <fieldset class="column noteScopeButtons">
+ <legend><?= __('writeNote.scope.label') ?></legend>
+ <?php foreach ($scopeOptions as $scope => $icon): ?>
+ <input type="radio" name="scope" value="<?= $scope ?>" id="replyScope-<?= $note->id ?>-<?= $scope ?>" <?= $scope == $selectedScope ? 'checked' : '' ?> autocomplete="off">
+ <label for="replyScope-<?= $note->id ?>-<?= $scope ?>" class="material-symbols <?= $icon ?>"
+ title="<?= __("note.privacy.scope.$scope") ?>"></label>
<?php endforeach; ?>
- </select>
+ </fieldset>
+ <fieldset class="column noteInteractorButtons">
+ <legend><?= __('writeNote.interactors.label') ?></legend>
+ <?php foreach (['none' => 'person-off', 'mutuals' => 'group', 'followers' => 'groups', 'all' => 'select-all'] as $group => $icon): ?>
+ <input type="radio" name="interactors" value="<?= $group ?>" id="replyInteractors-<?= $note->id ?>-<?= $group ?>"
+ <?= $group == $selectedInteractors ? 'checked' : '' ?> autocomplete="off">
+ <label for="replyInteractors-<?= $note->id ?>-<?= $group ?>" class="material-symbols <?= $icon ?>"
+ title="<?= __("note.privacy.interactors.$group") ?>"></label>
+ <?php endforeach; ?>
+ </fieldset>
+ </div>
+ <div class="row">
+ <label for="replyLanguage-<?= $note->id ?>"><?= __('misc.language') ?></label>
+ <input type="text" id="replyLanguage-<?= $note->id ?>" name="language"
+ value="<?= $note->language ?? get_ui_language() ?>">
</div>
</details>
<div class="row">