{strip} {$_is_admin = $wa->user()->isAdmin($wa->app())} {$_is_my_event = ( $user.id == $wa->user("id") )} {$_can_edit = ($_is_admin || $_is_my_event)} {$_calendars = []} {$_users = []} {$_selected_calendar = reset($available_calendars)} {if !empty($event.calendar_id) && !empty($available_calendars[$event.calendar_id])} {$_selected_calendar = $available_calendars[$event.calendar_id]} {/if} {if !empty($user) && !empty($available_users[$user.id])} {$_selected_user = $available_users[$user.id]} {else} {$_selected_user = reset($available_users)} {/if}

[`Status`]

[`Event`]

[`Status`] [`Event`]
[`Status will be displayed next to the user name in various apps.`]
[`Events are visible in calendars only.`]
{if $user || $_is_admin} {* USER *}
[`User`]
{/if} {* CALENDAR *}
[`Calendar`]
{* NAME *}
[`Event`]
{* DESCRIPTION *}
[`Description`]
{* LOCATION *}
[`Location`]
{* START *}
[`Start`]
{$event_end = $event.end} {$event_start = $event.start} {if !$event.is_allday} {* Convert event time to local contact timezone *} {$event_start = waDateTime::format('Y-m-d H:i:s', $event_start)} {$event_end = waDateTime::format('Y-m-d H:i:s', $event.end)} {/if}
{* END *}
[`End`]
[`All day`]
{* FOR STATUS *}
[`Label`]
[`Description`]
{/strip}