aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/attachment_pill.php
diff options
context:
space:
mode:
Diffstat (limited to 'templates/attachment_pill.php')
-rw-r--r--templates/attachment_pill.php22
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