{% set title %}{% trans "Name" %}{% endset %}
{% set helpText %}{% trans "An optional name for this widget" %}{% endset %}
{{ forms.input("name", title, module.getOption("name"), helpText) }}
{% set title %}{% trans "Set a duration?" %}{% endset %}
{% set helpText %}{% trans "Select to provide a specific duration for this Widget" %}{% endset %}
{{ forms.checkbox("useDuration", title, module.getUseDuration(), helpText) }}
{% set title %}{% trans "Duration" %}{% endset %}
{% set helpText %}{% trans "The duration in seconds this should be displayed" %}{% endset %}
{{ forms.number("duration", title, module.getDuration(), helpText, "duration-fields", "required") }}
{% set title %}{% trans "Enable Stats Collection?" %}{% endset %}
{% set helpText %}{% trans "Enable the collection of Proof of Play statistics for this Widget. Ensure that ‘Enable Stats Collection’ is set to ‘On’ in the Display Settings." %}{% endset %}
{% set offOption %}{% trans "Off" %}{% endset %}
{% set onOption %}{% trans "On" %}{% endset %}
{% set inheritOption %}{% trans "Inherit" %}{% endset %}
{% set options = [
{ id: "Off", value: offOption },
{ id: "On", value: onOption },
{ id: "Inherit", value: inheritOption }
] %}
{{ forms.dropdown("enableStat", "single", title, module.getOption("enableStat", theme.getSetting("WIDGET_STATS_ENABLED_DEFAULT")), options, "id", "value", helpText) }}
{% set title %}{% trans "Feed URL" %}{% endset %}
{% set helpText %}{% trans "The Link for the iCal Feed" %}{% endset %}
{{ forms.input("uri", title, module.getOption("uri")|url_decode, helpText)}}
{% set title %}{% trans "Calendar Type" %}{% endset %}
{% set helpText %}{% trans "Please select the type of calendar to display." %}{% endset %}
{% set schedule %}{% trans "Schedule" %}{% endset %}
{% set daily %}{% trans "Daily" %}{% endset %}
{% set weekly %}{% trans "Weekly" %}{% endset %}
{% set monthly %}{% trans "Monthly" %}{% endset %}
{% set options = [
{ id: 1, value: schedule },
{ id: 2, value: daily },
{ id: 3, value: weekly },
{ id: 4, value: monthly }
] %}
{{ forms.dropdown("calendarType", "single", title, module.getOption("calendarType"), options, "id", "value", helpText) }}
{% set title %}{% trans "Start Time" %}{% endset %}
{% set helpText %}{% trans %}Current view starting time.{% endtrans %}{% endset %}
{{ forms.time("startTime", title, module.getOption("startTime"), helpText, "daily-control-group weekly-control-group") }}
{% set title %}{% trans "End Time" %}{% endset %}
{% set helpText %}{% trans %}Current view ending time.{% endtrans %}{% endset %}
{{ forms.time("endTime", title, module.getOption("endTime"), helpText, "daily-control-group weekly-control-group") }}
{% set title %}{% trans "No events message" %}{% endset %}
{% set defaultMessage %}{% trans "No upcoming events" %}{% endset %}
{% set helpText %}{% trans "Message to be shown if no events are returned" %}{% endset %}
{{ forms.input("noEventsMessage", title, module.getOption("noEventsMessage", defaultMessage), helpText) }}
{# What range are we looking to return #}
{% set title %}{% trans "Interval" %}{% endset %}
{% set helpText %}{% trans "Using natural language enter a string representing the period for which events should be returned, for example 2 days or 1 week." %}{% endset %}
{{ forms.input("customInterval", title, module.getOption("customInterval"), helpText, "interval")}}
{% set title %}{% trans "Select a Date range to return events instead?" %}{% endset %}
{% set helpText %}{% trans "Use the checkbox to return events within defined start and end dates" %}{% endset %}
{{ forms.checkbox("useDateRange", title, module.getOption("useDateRange", 0), helpText) }}
{% set title %}{% trans "Start Date" %}{% endset %}
{{ forms.dateTime("rangeStart", title, module.getOption("rangeStart", null), "", "date-range") }}
{% set title %}{% trans "End Date" %}{% endset %}
{{ forms.dateTime("rangeEnd", title, module.getOption("rangeEnd", null, "", "date-range")) }}
{% set title %}{% trans "Exclude all day events?" %}{% endset %}
{% set helpText %}{% trans "When all day events are excluded they are removed from the list of events in the feed and wont be shown" %}{% endset %}
{{ forms.checkbox("excludeAllDay", title, module.getOption("excludeAllDay"), helpText) }}
{% set title %}{% trans "Exclude current events?" %}{% endset %}
{% set helpText %}{% trans "When current events are excluded they are removed from the list of events in the feed and wont be shown" %}{% endset %}
{{ forms.checkbox("excludeCurrent", title, module.getOption("excludeCurrent"), helpText) }}
{% set title %}{% trans "Use event timezone?" %}{% endset %}
{% set helpText %}{% trans "If an event specifies a timezone, should it be used. Deselection means the CMS timezone will be used." %}{% endset %}
{{ forms.checkbox("useEventTimezone", title, module.getOption("useEventTimezone", 1), helpText) }}
{% set title %}{% trans "Use calendar timezone?" %}{% endset %}
{% set helpText %}{% trans "If your calendar feed specifies its own time zone, should this be used for events without their own timezone? Deselecting means the CMS timezone will be used." %}{% endset %}
{{ forms.checkbox("useCalendarTimezone", title, module.getOption("useCalendarTimezone", 1), helpText) }}
{% set title %}{% trans "Windows format Calendar?" %}{% endset %}
{% set helpText %}{% trans "Does the calendar feed come from Windows - if unsure leave unselected." %}{% endset %}
{{ forms.checkbox("windowsFormatCalendar", title, module.getOption("windowsFormatCalendar", 0), helpText) }}
{% set title %}{% trans "Exclude weekend days?" %}{% endset %}
{% set helpText %}{% trans "Saturdays and Sundays wont be shown" %}{% endset %}
{{ forms.checkbox("excludeWeekendDays", title, module.getOption("excludeWeekendDays"), helpText, "weekly-control-group monthly-control-group") }}
{% set title %}{% trans "Time Format" %}{% endset %}
{% set helpText %}{% trans %}The format to apply to event time (default HH:mm).{% endtrans %}{% endset %}
{{ forms.input("timeFormat", title, module.getOption("timeFormat", "HH:mm"), helpText, "schedule-control-group daily-control-group weekly-control-group monthly-control-group") }}
{% set title %}{% trans "Show header?" %}{% endset %}
{% set helpText %}{% trans "Should the selected template have a header?" %}{% endset %}
{{ forms.checkbox("showHeader", title, module.getOption("showHeader", true), helpText, "monthly-control-group") }}
{% set title %}{% trans "Show now marker?" %}{% endset %}
{% set helpText %}{% trans "Should the calendar show a marker for the current time?" %}{% endset %}
{{ forms.checkbox("showNowMarker", title, module.getOption("showNowMarker", true), helpText, "schedule-control-group daily-control-group weekly-control-group") }}
{% set title %}{% trans "Show event description?" %}{% endset %}
{% set helpText %}{% trans "Should events with descriptions display them?" %}{% endset %}
{{ forms.checkbox("showDescription", title, module.getOption("showDescription", true), helpText, "schedule-control-group") }}
{% set title %}{% trans "Text scale" %}{% endset %}
{% set helpText %}{% trans "Set the scale for the text element on the calendar." %}{% endset %}
{{ forms.number("textScale", title, module.getOption("textScale", 1.0), helpText, "schedule-control-group daily-control-group weekly-control-group monthly-control-group") }}
{% set title %}{% trans "Week name length" %}{% endset %}
{% set helpText %}{% trans "Please select the lenght for the week names." %}{% endset %}
{% set short %}{% trans "Short" %}{% endset %}
{% set medium %}{% trans "Medium" %}{% endset %}
{% set long %}{% trans "Long" %}{% endset %}
{% set options = [
{ id: 'short', value: short },
{ id: 'medium', value: medium },
{ id: 'long', value: long }
] %}
{{ forms.dropdown("weekdayNameLength", "single", title, module.getOption("weekdayNameLength", "long"), options, "id", "value", helpText, "weekly-control-group monthly-control-group") }}
{% set title %}{% trans "Grid step" %}{% endset %}
{% set helpText %}{% trans "Duration, in minutes, for each row in the grid." %}{% endset %}
{{ forms.number("gridStep", title, module.getOption("gridStep", 60), helpText, "daily-control-group weekly-control-group") }}
{% set title %}{% trans "Theme" %}{% endset %}
{% set helpText %}{% trans "Please select the colours scheme." %}{% endset %}
{% set light %}{% trans "Light" %}{% endset %}
{% set dark %}{% trans "Dark" %}{% endset %}
{% set options = [
{ id: 'light', value: light },
{ id: 'dark', value: dark },
] %}
{{ forms.dropdown("templateTheme", "single", title, module.getOption("templateTheme"), options, "id", "value", helpText, "template-colors-select") }}
{% set title %}{% trans "Override colour template?" %}{% endset %}
{% set helpText %}{% trans "Tick if you would like to override the template." %}{% endset %}
{{ forms.checkbox("overrideColorTemplate", title, module.getOption("overrideColorTemplate"), helpText) }}
{% set calendarColorsExplanation %}
{% trans "Use the colour pickers to override the element colours." %}
{% endset %}
{{ forms.raw(calendarColorsExplanation, "h5 mt-3 mb-2") }}
{% set title %}{% trans "Main Background Colour" %}{% endset %}
{{ forms.colorPicker("mainBackgroundColor", title, module.getOption("mainBackgroundColor"), '', "col-sm-12 mb-2 schedule-control-group") }}
{% set title %}{% trans "Grid Colour" %}{% endset %}
{{ forms.colorPicker("gridColor", title, module.getOption("gridColor"), '', "col-sm-12 mb-2") }}
{% set title %}{% trans "Grid Text Colour" %}{% endset %}
{{ forms.colorPicker("gridTextColor", title, module.getOption("gridTextColor"), '', "col-sm-12 mb-2 daily-control-group weekly-control-group") }}
Header (Month)
{% set title %}{% trans "Background Colour" %}{% endset %}
{{ forms.colorPicker("headerBgColor", title, module.getOption("headerBgColor")) }}
{% set title %}{% trans "Text Colour" %}{% endset %}
{{ forms.colorPicker("headerTextColor", title, module.getOption("headerTextColor")) }}
Header (Weekdays)
{% set title %}{% trans "Background Colour" %}{% endset %}
{{ forms.colorPicker("weekDaysHeaderBgColor", title, module.getOption("weekDaysHeaderBgColor")) }}
{% set title %}{% trans "Text Colour" %}{% endset %}
{{ forms.colorPicker("weekDaysHeaderTextColor", title, module.getOption("weekDaysHeaderTextColor")) }}
Calendar Days
{% set title %}{% trans "Background Colour" %}{% endset %}
{{ forms.colorPicker("dayBgColor", title, module.getOption("dayBgColor")) }}
{% set title %}{% trans "Text Colour" %}{% endset %}
{{ forms.colorPicker("dayTextColor", title, module.getOption("dayTextColor"), "", "daily-control-group weekly-control-group monthly-control-group") }}
{% set title %}{% trans "Current day text Colour" %}{% endset %}
{{ forms.colorPicker("todayTextColor", title, module.getOption("todayTextColor")) }}
{% set title %}{% trans "Now marker Colour" %}{% endset %}
{{ forms.colorPicker("nowMarkerColor", title, module.getOption("nowMarkerColor"), "", "schedule-control-group daily-control-group weekly-control-group") }}
Other Month Days
{% set title %}{% trans "Background Colour" %}{% endset %}
{{ forms.colorPicker("dayOtherMonthBgColor", title, module.getOption("dayOtherMonthBgColor")) }}
{% set title %}{% trans "Text Colour" %}{% endset %}
{{ forms.colorPicker("dayOtherMonthTextColor", title, module.getOption("dayOtherMonthTextColor")) }}
Events
{% set title %}{% trans "Background Colour" %}{% endset %}
{{ forms.colorPicker("eventBgColor", title, module.getOption("eventBgColor")) }}
{% set title %}{% trans "Text Colour" %}{% endset %}
{{ forms.colorPicker("eventTextColor", title, module.getOption("eventTextColor")) }}
All day events
{% set title %}{% trans "Background Colour" %}{% endset %}
{{ forms.colorPicker("dailyEventBgColor", title, module.getOption("dailyEventBgColor")) }}
{% set title %}{% trans "Text Colour" %}{% endset %}
{{ forms.colorPicker("dailyEventTextColor", title, module.getOption("dailyEventTextColor")) }}
Multiple days events
{% set title %}{% trans "Background Colour" %}{% endset %}
{{ forms.colorPicker("multiDayEventBgColor", title, module.getOption("multiDayEventBgColor")) }}
{% set title %}{% trans "Text Colour" %}{% endset %}
{{ forms.colorPicker("multiDayEventTextColor", title, module.getOption("multiDayEventTextColor")) }}
Aditional days container
{% set title %}{% trans "Background Colour" %}{% endset %}
{{ forms.colorPicker("aditionalEventsBgColor", title, module.getOption("aditionalEventsBgColor")) }}
{% set title %}{% trans "Text Colour" %}{% endset %}
{{ forms.colorPicker("aditionalEventsTextColor", title, module.getOption("aditionalEventsTextColor")) }}
No events message
{% set title %}{% trans "Background Colour" %}{% endset %}
{{ forms.colorPicker("noEventsBgColor", title, module.getOption("noEventsBgColor")) }}
{% set title %}{% trans "Text Colour" %}{% endset %}
{{ forms.colorPicker("noEventsTextColor", title, module.getOption("noEventsTextColor")) }}
{% set title %}{% trans "Update Interval (mins)" %}{% endset %}
{% set helpText %}{% trans "Please enter the update interval in minutes. This should be kept as high as possible. For example, if the data will only change once per hour this could be set to 60." %}{% endset %}
{{ forms.number("updateInterval", title, module.getOption("updateInterval", 5), helpText, "", "required") }}
{% set calendarTriggerExplanation %}
{% trans "Web Hook triggers can be executed when certain conditions are detected. If you would like to execute a trigger, enter the trigger code below against each event." %}
{% endset %}
{{ forms.message(calendarTriggerExplanation) }}
{% set title %}{% trans "Current Event" %}{% endset %}
{% set helpText %}{% trans "Code to be triggered when a event is currently ongoing." %}{% endset %}
{{ forms.input("currentEventTrigger", title, module.getOption("currentEventTrigger"), helpText) }}
{% set title %}{% trans "No Event" %}{% endset %}
{% set helpText %}{% trans "Code to be triggered when no events are ongoing at the moment." %}{% endset %}
{{ forms.input("noEventTrigger", title, module.getOption("noEventTrigger"), helpText) }}