diff options
Diffstat (limited to 'templates/write_note_form.php')
| -rw-r--r-- | templates/write_note_form.php | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/templates/write_note_form.php b/templates/write_note_form.php index 82964c5..9294a7c 100644 --- a/templates/write_note_form.php +++ b/templates/write_note_form.php @@ -4,7 +4,8 @@ </form> <form id="writeNoteForm" action="/todo" method="post" hx-post="/fragment/note" hx-swap="outerHTML" - hx-disabled-elt="find button" _="on submit wait 1s then trigger update on #liveTimelineUpdater"> + 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 ?>"> <?php call_template('actor_avatar', ['actor' => $actor]); ?> @@ -21,23 +22,26 @@ <textarea name="content" id="noteContent" required autocomplete="off" placeholder="<?= __('writeNote.placeholder') ?>"></textarea> </div> - <div class="row"> - <label class="standalone"><?= __('writeNote.mentions.label') ?></label> - <?php call_template('user_mention_pill'); ?> - </div> - <div class="row"> - <label class="standalone"><?= __('writeNote.attachments.label') ?></label> - <?php call_template('attachment_pill'); ?> - </div> - <div class="row"> - <label for="noteScope"><?= __('writeNote.scope.label') ?></label> - <select name="scope" id="noteScope" required autocomplete="off"> - <option value="none"><?= __('note.privacy.scope.none') ?></option> - <option value="mutuals"><?= __('note.privacy.scope.mutuals') ?></option> - <option value="followers"><?= __('note.privacy.scope.followers') ?></option> - <option value="public" selected><?= __('note.privacy.scope.public') ?></option> - </select> - </div> + <details> + <summary><?= __('writeNote.moreOptions') ?></summary> + <div class="row"> + <label class="standalone"><?= __('writeNote.mentions.label') ?></label> + <?php call_template('user_mention_pill'); ?> + </div> + <div class="row"> + <label class="standalone"><?= __('writeNote.attachments.label') ?></label> + <?php call_template('attachment_pill'); ?> + </div> + <div class="row"> + <label for="noteScope"><?= __('writeNote.scope.label') ?></label> + <select name="scope" id="noteScope" required autocomplete="off"> + <option value="none"><?= __('note.privacy.scope.none') ?></option> + <option value="mutuals"><?= __('note.privacy.scope.mutuals') ?></option> + <option value="followers"><?= __('note.privacy.scope.followers') ?></option> + <option value="public" selected><?= __('note.privacy.scope.public') ?></option> + </select> + </div> + </details> <div class="row"> <button class="primary"><?= __('writeNote.action') ?></button> </div> |
