diff options
Diffstat (limited to 'templates/note')
| -rw-r--r-- | templates/note/reply_form.php | 37 | ||||
| -rw-r--r-- | templates/note/write_form.php | 7 |
2 files changed, 32 insertions, 12 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"> diff --git a/templates/note/write_form.php b/templates/note/write_form.php index abd916c..d6178fa 100644 --- a/templates/note/write_form.php +++ b/templates/note/write_form.php @@ -58,8 +58,13 @@ <label class="standalone"><?= __('writeNote.attachments.label') ?></label> <?php call_template('note/attachment_pill'); ?> </div> + <div class="row"> + <label for="noteLanguage"><?= __('misc.language') ?></label> + <input type="text" id="noteLanguage" name="language" + value="<?= get_ui_language() ?>"> + </div> </details> <div class="row"> <button class="primary" id="writeNoteSubmitButton"><?= __('writeNote.action') ?></button> </div> -</form>
\ No newline at end of file +</form> |
