fetch writeable calendars of user and display a dropdown in confirm dialog with list of calendars to choose for the event

This commit is contained in:
stefan.tollkuehn committed 2026-10-08 12:53:40 +02:00
1 parent f51bb830ab
commit fa398f5b36
3 files changed
+112 -17

No files matched your search

+18
View File
@@ -100,6 +100,24 @@ $h = static function (string $value): string {
method="post"
action="<?= $h($_['createUrl']) ?>"
>
<?php if ($_['calendars'] !== []): ?>
<div class="atocal-row">
<label for="atocal-calendar">
<strong>Calendar</strong>
</label>
<select id="atocal-calendar" name="calendarId">
<?php foreach ($_['calendars'] as $calendar): ?>
<option
value="<?= $h($calendar['id']) ?>"
<?= $calendar['id'] === $_['calendarId'] ? 'selected' : '' ?>
>
<?= $h($calendar['displayName']) ?>
</option>
<?php endforeach; ?>
</select>
</div>
<?php endif; ?>
<input
type="hidden"
name="requesttoken"
+11
View File
@@ -52,6 +52,17 @@
overflow-wrap: anywhere;
}
.atocal-row select {
align-self: center;
width: 100%;
max-width: 280px;
padding: 6px 8px;
border: 1px solid var(--color-border);
border-radius: 6px;
background: var(--color-main-background);
color: var(--color-main-text);
}
.atocal-row .description {
white-space: normal;
}