{# /* * Copyright (C) 2024 Xibo Signage Ltd * * Xibo - Digital Signage - https://xibosignage.com * * 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 . */ #} {% extends "authed.twig" %} {% import "inline.twig" as inline %} {% import "forms.twig" as forms %} {% block title %}{% set templateName = template.title %}{% trans %}{{ templateName }} - Module Template{% endtrans %} | {% endblock %} {% set hideNavigation = "1" %} {% block pageContent %}
{{ forms.alert("Changing the ID or DataType will break any existing Widgets which use this template.", "danger") }} {% set title %}{% trans "ID" %}{% endset %} {% set helpText %}{% trans "A unique ID for the module template" %}{% endset %} {{ forms.input("templateId", title, template.templateId, helpText) }} {% set title %}{% trans "Title" %}{% endset %} {% set helpText %}{% trans "A title for the module template" %}{% endset %} {{ forms.input("title", title, template.title, helpText) }} {% set attributes = [ { name: "data-search-url", value: url_for("developer.templates.datatypes.search") }, { name: "data-search-term", value: "name" }, { name: "data-id-property", value: "id" }, { name: "data-text-property", value: "name" }, { name: "data-initial-key", value: "dataType" }, { name: "data-initial-value", value: template.dataType }, { name: "data-hide-search", value: 1} ] %} {% set title %}{% trans "Data Type" %}{% endset %} {% set helpText %}{% trans "Which data type does this template need?" %}{% endset %} {{ forms.dropdown("dataType", "single", title, null, null, "id", "id", helpText, "pagedSelect", "", "", "", attributes) }} {% set title %}{% trans "Show In" %}{% endset %} {% set helpText %}{% trans "Which Editor should this template be available in?" %}{% endset %} {% set options = [ { id: "none", name: "None"|trans }, { id: "layout", name: "Layout Editor"|trans }, { id: "playlist", name: "Playlist Editor"|trans }, { id: "both", name: "Both"|trans }, ] %} {{ forms.dropdown("showIn", "single", title, template.showIn, options, "id", "name", helpText) }} {% set title %}{% trans "Enabled?" %}{% endset %} {% set helpText %}{% trans "Is this template enabled?" %}{% endset %} {{ forms.checkbox("enabled", title, template.isEnabled, helpText) }}
{{ "Properties"|trans }}
{{ "Twig"|trans }}
{{ "HBS"|trans }}
{{ "Style"|trans }}
{{ "Head"|trans }}
{{ "onTemplateRender"|trans }}
{{ "onTemplateVisible"|trans }}
{{ forms.checkbox("isInvalidateWidget", "Invalidate any widgets using this template"|trans, 1) }} {{ forms.button("Save"|trans, "submit", null, null, null, "btn-success") }}
{% endblock %} {% block javaScript %} {% verbatim %} {% endverbatim %} {# Add code editor bundle #} {% endblock %}