{% 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 "Setting for enabling statistic collection" %}{% 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 fitMessage %}{{ "Fit supported from: "|trans }} {% endset %}
{% set title %}{% trans "Scale type" %} {{ forms.playerCompat("v3 R304", "TBC", "TBC", "TBC", "v3 R303", fitMessage) }}{% endset %}
{% set helpText %}{% trans "How should this image be scaled?" %}{% endset %}
{% set center %}{% trans "Centre" %}{% endset %}
{% set stretch %}{% trans "Stretch" %}{% endset %}
{% set fit %}{% trans "Fit" %}{% endset %}
{% set options = [
{ scaleTypeId: "center", scaleType: center },
{ scaleTypeId: "stretch", scaleType: stretch },
{ scaleTypeId: "fit", scaleType: fit },
] %}
{{ forms.dropdown("scaleTypeId", "single", title, module.getOption("scaleType"), options, "scaleTypeId", "scaleType", helpText) }}
{% set title %}{% trans "Horizontal Align" %}{% endset %}
{% set helpText %}{% trans "How should this image be aligned?" %}{% endset %}
{% set left %}{% trans "Left" %}{% endset %}
{% set center %}{% trans "Centre" %}{% endset %}
{% set right %}{% trans "Right" %}{% endset %}
{% set options = [
{ alignId: "left", align: left },
{ alignId: "center", align: center },
{ alignId: "right", align: right }
] %}
{{ forms.dropdown("alignId", "single", title, module.getOption("align","center"), options, "alignId", "align", helpText, "align-fields") }}
{% set title %}{% trans "Vertical Align" %}{% endset %}
{% set helpText %}{% trans "How should this image be vertically aligned?" %}{% endset %}
{% set top %}{% trans "Top" %}{% endset %}
{% set middle %}{% trans "Middle" %}{% endset %}
{% set bottom %}{% trans "Bottom" %}{% endset %}
{% set options = [
{ valignId: "top", valign: top },
{ valignId: "middle", valign: middle },
{ valignId: "bottom", valign: bottom }
] %}
{{ forms.dropdown("valignId", "single", title, module.getoption("valign", "middle"), options, "valignId", "valign", helpText, "align-fields") }}