0byt3m1n1
Path:
/
home
/
mgatv524
/
public_html
/
giga
/
modules
/
[
Home
]
File: webpage-form-edit.twig
{# /** * Copyright (C) 2021 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 "Add Webpage" %} {% 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"><span>{% trans "Configuration" %}</span></a></li> </ul> <div class="col-md-12"> <form id="webpageEditForm" 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 item 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) }} </div> <div class="tab-pane" id="configurationTab"> {% set title %}{% trans "Link" %}{% endset %} {% set helpText %}{% trans "The Location (URL) of the webpage" %}{% endset %} {{ forms.input("uri", title, module.getOption("uri")|url_decode, helpText, "required") }} {% set title %}{% trans "Background transparent?" %} {{ forms.playerCompat("", "", "", "", "v2 R253+") }}{% endset %} {% set helpText %}{% trans "Should the Widget be shown with a transparent background? Also requires the embedded content to have a transparent background." %}{% endset %} {{ forms.checkbox("transparency", title, module.GetOption("transparency"), helpText) }} {% set title %}{% trans "Preload?" %} {{ forms.playerCompat("v2 R207+") }}{% endset %} {% set helpText %}{% trans "Should this Widget be loaded entirely off screen so that it is ready when shown? Dynamic content will start running off screen." %}{% endset %} {{ forms.checkbox("isPreNavigate", title, module.getOption("isPreNavigate"), helpText) }} {% set title %}{% trans "Options" %}{% endset %} {% set helpText %}{% trans "How should this web page be embedded?" %}{% endset %} {% set openNatively %}{% trans "Open Natively" %}{% endset %} {% set manualPosition %}{% trans "Manual Position" %}{% endset %} {% set bestFit %}{% trans "Best Fit" %}{% endset %} {% set options = [ { modeid: 1, mode: openNatively }, { modeid: 2, mode: manualPosition }, { modeid: 3, mode: bestFit } ] %} {{ forms.dropdown("modeId", "single", title, module.getOption("modeid"), options, "modeid", "mode", helpText) }} {% set title %}{% trans "Page Width" %}{% endset %} {% set helpText %}{% trans "The width of the page. Leave empty to use the region width." %}{% endset %} {{ forms.number("pageWidth", title, module.getOption("pageWidth"), helpText, "webpage-widths") }} {% set title %}{% trans "Page Height" %}{% endset %} {% set helpText %}{% trans "The height of the page. Leave empty to use the region height." %}{% endset %} {{ forms.number("pageHeight", title, module.getOption("pageHeight"), helpText, "webpage-widths") }} {% set title %}{% trans "Offset Top" %}{% endset %} {% set helpText %}{% trans "The starting point from the top in pixels" %}{% endset %} {{ forms.number("offsetTop", title, module.getOption("offsetTop"), helpText, "webpage-offsets") }} {% set title %}{% trans "Offset Left" %}{% endset %} {% set helpText %}{% trans "The starting point from the left in pixels" %}{% endset %} {{ forms.number("offsetLeft", title, module.getOption("offsetLeft"), helpText, "webpage-offsets") }} {% set title %}{% trans "Scale Percentage" %}{% endset %} {% set helpText %}{% trans "The Percentage to Scale this Webpage (0 - 100)" %}{% endset %} {{ forms.number("scaling", title, module.getOption("scaling"), helpText, "webpage-offsets") }} {% set title %}{% trans "Trigger on page load error" %}{% endset %} {% set helpText %}{% trans "Code to be triggered when the page to be loaded returns an error, e.g. a 404 not found." %} {{ forms.playerCompat("v3 R303+", "", "", "", "v3 R302+") }}{% endset %} {{ forms.input("pageLoadErrorTrigger", title, module.getOption("pageLoadErrorTrigger"), helpText, "webpage-triggers") }} </div> </div> </form> </div> </div> {% endblock %}