0byt3m1n1
Path:
/
home
/
mgatv524
/
lot.mgaplay.com.br
/
modules
/
[
Home
]
File: currencies-form-edit.twig
{# /** * Copyright (C) 2020 Xibo Signage Ltd * * Xibo - Digital Signage - http://www.xibo.org.uk * * This file is part of Xibo. * * Xibo is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * Xibo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Xibo. If not, see <http://www.gnu.org/licenses/>. */ #} {% extends "form-base.twig" %} {% import "forms.twig" as forms %} {% block formTitle %} {% trans "Edit Currencies" %} {% endblock %} {% block formButtons %} {% trans "Get Results" %}, formHelpers.requestTab("results"| "{{ url_for("module.widget.tab.form", {tab: "results", id: module.widget.widgetId}) }}") {% endblock %} {% block extra %}{{ module.templatesAvailable()|json_encode|raw }}{% endblock %} {% block formHtml %} <div class="row"> <ul class="nav nav-tabs" role="tablist"> <li class="nav-item"><a class="nav-link active" href="#general" role="tab" data-toggle="tab"><span>{% trans "General" %}</span></a></li> <li class="nav-item"><a class="nav-link" href="#configurationTab" role="tab" data-toggle="tab" data-enlarge="1"><span>{% trans "Configuration" %}</span></a></li> <li class="nav-item"><a class="nav-link" href="#appearanceTab" role="tab" data-toggle="tab"><span>{% trans "Appearance" %}</span></a></li> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false"> {% trans "Templates" %}<span class="caret"></span> </a> <div class="dropdown-menu"> <a class="dropdown-item" href="#templatePreset" role="tab" data-toggle="tab"><span>{% trans "Preset" %}</span></a> <a class="dropdown-item template-override-controls" href="#templateTab" role="tab" data-toggle="tab"><span>{% trans "Main" %}</span></a> <a class="dropdown-item template-override-controls" href="#itemTemplateTab" role="tab" data-toggle="tab"><span>{% trans "Item" %}</span></a> <a class="dropdown-item template-override-controls" href="#optionalStylesheetTab" role="tab" data-toggle="tab"><span>{% trans "Optional Stylesheet" %}</span></a> <a class="dropdown-item" href="#noRecordsMessageTab" role="tab" data-toggle="tab"><span>{% trans "No Records Message" %}</span></a> </div> </li> <li class="nav-item"><a class="nav-link" href="#cachingTab" role="tab" data-toggle="tab"><span>{% trans "Caching" %}</span></a></li> <li class="nav-item"><a class="nav-link" href="#results" role="tab" data-toggle="tab"><span>{% trans "Results" %}</span></a></li> </ul> <div class="col-md-12"> <form id="currenciesEditForm" class="XiboForm form-horizontal" method="put" action="{{ url_for("module.widget.edit", {id: module.widget.widgetId}) }}"> <div class="tab-content"> <div class="tab-pane active" id="general"> {% 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 "Duration is per page" %}{% endset %} {% set helpText %}{% trans "The duration specified is per page/item otherwise the widget duration is divided between the number of pages/items." %}{% endset %} {{ forms.checkbox("durationIsPerPage", title, module.getOption("durationIsPerPage"), helpText) }} {% 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) }} </div> <div class="tab-pane" id="configurationTab"> {% set title %}{% trans "Currencies" %}{% endset %} {% set helpText %}{% trans "A comma separated list of Currency Acronyms/Abbreviations, e.g. GBP,USD,EUR. For the best results enter no more than 5 items." %}{% endset %} {{ forms.input("items", title, module.getOption("items"), helpText, "", "required") }} {% set title %}{% trans "Base" %}{% endset %} {% set helpText %}{% trans "The base currency." %}{% endset %} {{ forms.input("base", title, module.getOption("base"), helpText, "", "required") }} {% set title %}{% trans "Reverse conversion?" %}{% endset %} {% set helpText %}{% trans "Tick if you would like your base currency to be used as the comparison currency for each currency you've entered. For example base/compare becomes compare/base - USD/GBP becomes GBP/USD." %}{% endset %} {{ forms.checkbox("reverseConversion", title, module.getOption("reverseConversion", 0), helpText) }} </div> <div class="tab-pane" id="appearanceTab"> {% set title %}{% trans "Background Colour" %}{% endset %} {% set helpText %}{% trans "The selected effect works best with a background colour. Optionally add one here." %}{% endset %} {{ forms.colorPicker("backgroundColor", title, module.getOption("backgroundColor"), helpText, "background-color-group") }} {% set title %}{% trans "Date Format" %} <span class="fa fa-info-circle date-format-table" data-toggle="popover" data-trigger="hover"> </span> {% endset %} {% set helpText %}{% trans "The format to apply to all dates returned by the Widget." %}{% endset %} {{ forms.input("dateFormat", title, module.getOption("dateFormat"), helpText) }} {% set title %}{% trans "Effect" %}{% endset %} {% set helpText %}{% trans "Please select the effect that will be used to transition between items. If all items should be output, select None. Marquee effects are CPU intensive and may not be suitable for lower power displays." %}{% endset %} {% set noneOption %}{% trans "None" %}{% endset %} {% set fade %}{% trans "Fade" %}{% endset %} {% set fadeout %}{% trans "Fade Out" %}{% endset %} {% set scrollHorz %}{% trans "Scroll Horizontal" %}{% endset %} {% set scrollVert %}{% trans "Scroll Vertical" %}{% endset %} {% set flipHorz %}{% trans "Flip Horizontal" %}{% endset %} {% set flipVert %}{% trans "Flip Vertical" %}{% endset %} {% set shuffle %}{% trans "Shuffle" %}{% endset %} {% set tileSlide %}{% trans "Tile Slide" %}{% endset %} {% set tileBlind %}{% trans "Tile Blind" %}{% endset %} {% set marqueeLeft %}{% trans "Marquee Left" %}{% endset %} {% set marqueeRight %}{% trans "Marquee Right" %}{% endset %} {% set marqueeUp %}{% trans "Marquee Up" %}{% endset %} {% set marqueeDown %}{% trans "Marquee Down" %}{% endset %} {% set options = [ { effectid: "none", effect: noneOption }, { effectid: "fade", effect: fade }, { effectid: "fadeout", effect: fadeout}, { effectid: "scrollHorz", effect: scrollHorz}, { effectid: "scrollVert", effect: scrollVert}, { effectid: "flipHorz", effect: flipHorz}, { effectid: "flipVert", effect: flipVert}, { effectid: "shuffle", effect: shuffle}, { effectid: "tileSlide", effect: tileSlide}, { effectid: "tileBlind", effect: tileBlind} ] %} {{ forms.dropdown("effect", "single", title, module.getOption("effect"), options, "effectid", "effect", helpText) }} {% set title %}{% trans "Speed" %}{% endset %} {% set helpText %}{% trans "The transition speed of the selected effect in milliseconds (normal = 1000) or the Marquee Speed in a low to high scale (normal = 1)." %}{% endset %} {{ forms.number("speed", title, module.getOption("speed"), helpText, "effect-controls") }} {% set title %}{% trans "Horizontal Align" %}{% endset %} {% set helpText %}{% trans "How should this widget be aligned?" %}{% endset %} {% set left %}{% trans "Left" %}{% endset %} {% set center %}{% trans "Centre" %}{% endset %} {% set right %}{% trans "Right" %}{% endset %} {% set options = [ { alignH: "left", align: left }, { alignH: "center", align: center }, { alignH: "right", align: right } ] %} {{ forms.dropdown("alignH", "single", title, module.getOption("alignH","center"), options, "alignH", "align", helpText, "align-fields") }} {% set title %}{% trans "Vertical Align" %}{% endset %} {% set helpText %}{% trans "How should this widget be vertically aligned?" %}{% endset %} {% set top %}{% trans "Top" %}{% endset %} {% set middle %}{% trans "Middle" %}{% endset %} {% set bottom %}{% trans "Bottom" %}{% endset %} {% set options = [ { alignV: "top", valign: top }, { alignV: "middle", valign: middle }, { alignV: "bottom", valign: bottom } ] %} {{ forms.dropdown("alignV", "single", title, module.getoption("alignV", "middle"), options, "alignV", "valign", helpText, "align-fields") }} </div> <div class="tab-pane" id="templatePreset"> {% 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"), 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 title %}{% trans "Items per Page" %}{% endset %} {% set helpText %}{% trans "This is the intended number of items on each page." %}{% endset %} {{ forms.number("maxItemsPerPage", title, module.getOption("maxItemsPerPage", undefined), helpText, "template-override-controls", "required") }} </div> <div class="tab-pane" id="templateTab"> <div class="form-content-title row"> <h4 class="col-12 text-left">{% trans "Main Template" %}</h4> </div> <div class="editor-messages"> {% set simpleTextEditorMessage %} {% trans "Enter text or HTML in the box below." %}<br> {% endset %} {{ forms.message(simpleTextEditorMessage) }} </div> {{ forms.textarea("mainTemplate", "", module.getRawNode("mainTemplate"), "", "", "", 10) }} </div> <div class="tab-pane" id="itemTemplateTab"> <div class="form-content-title row"> <h4 class="col-12 text-left">{% trans "Item Template" %}</h4> </div> <div class="editor-messages"> {% set simpleTextEditorMessage %} {% trans "Enter text or HTML in the box below." %}<br> {% endset %} {{ forms.message(simpleTextEditorMessage) }} </div> {% set helpText %}{% trans "Enter the template for each item. Replaces [itemsTemplate] in main template." %}{% endset %} {{ forms.textarea("itemTemplate", "", module.getRawNode("itemTemplate"), "", "", "", 10) }} </div> <div class="tab-pane" id="optionalStylesheetTab"> <div class="form-content-title"> <h4>{% trans "Optional Stylesheet" %}</h4> </div> {{ forms.textarea("styleSheet", "", module.getRawNode("styleSheet"), "", "", "", 10) }} </div> <div class="tab-pane" id="noRecordsMessageTab"> <div class="form-content-title"> <h4>{% trans "No Records" %}</h4> </div> {% set title %}{% trans "Message" %}{% endset %} {% set helpText %}{% trans "A message to display when there are no records returned by the search query" %}{% endset %} {{ forms.input("noRecordsMessage", title, module.getOption("noRecordsMessage"), helpText) }} </div> <div class="tab-pane" id="cachingTab"> {% 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", 60), helpText, "", "required") }} </div> <div class="tab-pane" id="results"></div> </div> </form> </div> </div> {% endblock %}