diff options
| author | winter | 2025-03-15 18:53:29 +0000 |
|---|---|---|
| committer | winter | 2025-03-15 18:53:29 +0000 |
| commit | e0588a6113ff6b3c1000fa6c82629f81fb5e05b5 (patch) | |
| tree | ef6beb046a7dcc7542b88f0962d4e5e264895b7a /templates/note/write_form.php | |
| parent | 61b122e88cc6783b4d0cf5142a22002f8e558c60 (diff) | |
[refactor] move some templates to subdirs
Diffstat (limited to 'templates/note/write_form.php')
| -rw-r--r-- | templates/note/write_form.php | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/templates/note/write_form.php b/templates/note/write_form.php new file mode 100644 index 0000000..add00ec --- /dev/null +++ b/templates/note/write_form.php @@ -0,0 +1,49 @@ +<form hidden id="writeNoteAttachmentForm" action="/todo" hx-post="/fragment/note/attachmentPill" hx-swap="beforebegin" + hx-target="#writeNoteAttachmentPillAdder" enctype="multipart/form-data"> + <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" + 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]); ?> + </a> + <div class="basicInfo"> + <a class="displayName" href="/@/<?= $actor->handle ?>"><?= htmlspecialchars($actor->displayName) ?></a> + <div class="handle">@<?= $actor->handle ?></div> + </div> + </div> + <div class="row summaryAndContent"> + <label for="noteContent"><?= __('writeNote.label') ?></label> + <input type="text" id="noteSummary" name="summary" autocomplete="off" + placeholder="<?= __('writeNote.summary.label') ?>"> + <textarea name="content" id="noteContent" required autocomplete="off" + placeholder="<?= __('writeNote.placeholder') ?>"></textarea> + <?php call_template('formatting_hint'); ?> + </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('note/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> +</form>
\ No newline at end of file |
