diff options
| author | winter | 2025-01-28 22:00:20 +0000 |
|---|---|---|
| committer | winter | 2025-01-28 22:00:20 +0000 |
| commit | 093b34db9498d9ce1155c1fd8a59646aa483f85d (patch) | |
| tree | ca596c39d6e001f118b8381cf77d746300add468 /templates/write_note_form.php | |
| parent | 1af3a4e00ec63755a90109d8a63a1b6f6d95def6 (diff) | |
add upload/attach file feature for writing notes
Diffstat (limited to 'templates/write_note_form.php')
| -rw-r--r-- | templates/write_note_form.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/templates/write_note_form.php b/templates/write_note_form.php index b86e825..82964c5 100644 --- a/templates/write_note_form.php +++ b/templates/write_note_form.php @@ -1,3 +1,8 @@ +<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"> <div class="row miniProfile"> @@ -21,6 +26,10 @@ <?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> |
