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/attachment_pill.php | |
| parent | 1af3a4e00ec63755a90109d8a63a1b6f6d95def6 (diff) | |
add upload/attach file feature for writing notes
Diffstat (limited to 'templates/attachment_pill.php')
| -rw-r--r-- | templates/attachment_pill.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/templates/attachment_pill.php b/templates/attachment_pill.php new file mode 100644 index 0000000..76fc590 --- /dev/null +++ b/templates/attachment_pill.php @@ -0,0 +1,22 @@ +<?php +$type ??= 'add'; +?> + +<?php if ($type == 'add'): ?> + + <button id="writeNoteAttachmentPillAdder" type="button" class="inlinePill" type="button" + _="on click set f to #noteAttachmentFile then f.click()"> + <span class="pillIcon material-symbols add"></span> + <span class="pillText"><?= __('writeNote.attachments.add.action') ?></span> + </button> + +<?php elseif ($type == 'file'): ?> + + <button class="inlinePill" type="button" _="on click remove me"> + <span class="pillIcon material-symbols attach-file"></span> + <span class="pillText"><?= $name ?></span> + <input type="hidden" name="attachments[]" value="<?= $oid ?>"> + <span class="pillIcon material-symbols close-small"></span> + </button> + +<?php endif; ?>
\ No newline at end of file |
