0byt3m1n1
Path:
/
home
/
mgatv524
/
giga.mgaplay.com.br
/
modules
/
[
Home
]
File: image-form-edit.twig
{# /** * Copyright (C) 2022 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 Image" %} {% 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="#appearanceTab" role="tab" data-toggle="tab"><span>{% trans "Appearance" %}</span></a></li> </ul> <div class="col-md-12"> <form id="imageEditForm" class="XiboForm form-horizontal" method="put" action="{{ url_for("module.widget.edit", {id: module.widget.widgetId}) }}" data-widget-id="{{ module.widget.widgetId }}" data-media-id="{{ module.getMediaId() }}" data-media-editable="{{ currentUser.checkEditable(module.getMedia()) }}" data-valid-extensions="{{ validExtensions }}"> <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 "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) }} </div> <div class="tab-pane" id="appearanceTab"> {% 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") }} </div> </div> </form> </div> </div> {% endblock %}