{% 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 "Countdown Type" %}{% endset %}
{% set helpText %}{% trans "Please select the type of countdown." %}{% endset %}
{% set useWidgetDuration %}{% trans "Widget Duration" %}{% endset %}
{% set useCustomDuration %}{% trans "Custom Duration" %}{% endset %}
{% set useDate %}{% trans "Use Date" %}{% endset %}
{% set options = [
{ id: 1, value: useWidgetDuration },
{ id: 2, value: useCustomDuration },
{ id: 3, value: useDate }
] %}
{{ forms.dropdown("countdownType", "single", title, module.getOption("countdownType"), options, "id", "value", helpText) }}
{% set title %}{% trans "Countdown Duration" %}{% endset %}
{% set helpText %}{% trans "The duration in seconds." %}{% endset %}
{{ forms.input("countdownDuration", title, module.getOption("countdownDuration"), helpText, "duration-group") }}
{% set title %}{% trans "Countdown Date" %}{% endset %}
{% set helpText %}{% trans "Select the target date and time." %}{% endset %}
{{ forms.dateTime("countdownDate", title, module.getOption("countdownDate"), helpText, "date-group") }}
{% set title %}{% trans "Warning Duration" %}{% endset %}
{% set helpText %}{% trans "The countdown will show in a warning mode from the end duration entered." %}{% endset %}
{{ forms.input("countdownWarningDuration", title, module.getOption("countdownWarningDuration"), helpText, "duration-group widget-duration-group") }}
{% set title %}{% trans "Warning Date" %}{% endset %}
{% set helpText %}{% trans "The countdown will show in a warning mode from the warning date entered." %}{% endset %}
{{ forms.dateTime("countdownWarningDate", title, module.getOption("countdownWarningDate"), helpText, "date-group") }}
{% set title %}{% trans "Template" %}{% endset %}
{% set helpText %}{% trans "Select the template you would like to apply. This can be overridden using the check box below." %}{% endset %}
{{ forms.dropdown("templateId", "single", title, module.getOption("templateId"), module.templatesAvailable(), "id", "value", helptext, "template-selector-control selectPicker selectPickerWithImage", null, null, null, [{ name: "data-minimum-results-for-search", value: "Infinity" },{ name: "data-width", value: "100%" }], null, "image") }}
{% set title %}{% trans "Override the template?" %}{% endset %}
{% set helpText %}{% trans "Tick if you would like to override the template." %}{% endset %}
{{ forms.checkbox("overrideTemplate", title, module.getOption("overrideTemplate", 0), helpText) }}
{% set useTemplatesMessage %}
{% trans "With Override the Template selected enter your own text, html and css by using the Templates drop down menu in the tab header above." %}
{% endset %}
{{ forms.message(useTemplatesMessage, 'template-override-controls') }}
{% set title %}{% trans "Original Width" %}{% endset %}
{% set helpText %}{% trans "This is the intended width of the template and is used to scale the Widget within its region when the template is applied." %}{% endset %}
{{ forms.number("widgetOriginalWidth", title, module.getOption("widgetOriginalWidth", undefined), helpText, "template-override-controls", "", "number") }}
{% set title %}{% trans "Original Height" %}{% endset %}
{% set helpText %}{% trans "This is the intended height of the template and is used to scale the Widget within its region when the template is applied." %}{% endset %}
{{ forms.number("widgetOriginalHeight", title, module.getOption("widgetOriginalHeight", undefined), helpText, "template-override-controls", "", "number") }}
{% set message %}{% trans "Enter a format for the Countdown e.g. [hha], [hh], [mm], [ss] or [DD]. See the manual for more information." %}{% endset %}
{{ forms.message(message, "") }}
{% set simpleTextEditorMessage %}
{% trans "Enter text or HTML in the box below." %}
{% endset %}
{{ forms.message(simpleTextEditorMessage, 'mainTemplate-advanced-editor-hide') }}
{{ forms.textarea("mainTemplate", "", module.getRawNode("mainTemplate"), "", "", "", 10) }}
{% trans "Optional Stylesheet" %}
{{ forms.textarea("styleSheet", "", module.getRawNode("styleSheet"), "", "", "", 10) }}