0byt3m1n1
Path:
/
home
/
mgatv524
/
medcenter.mgaplay.com.br
/
modules
/
[
Home
]
File: shellcommand-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 Shell Command" %} {% 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> <li class="new-command-fields"><a href="#advanceTab" role="tab" data-toggle="tab"><span>{% trans "Advanced" %}</span></a></li> </ul> <div class="col-md-12"> <form id="shellCommandEditForm" 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 "Terminate the command once the duration elapses?" %}{% endset %} {% set helpText %}{% trans "Should the player forcefully terminate the command after the duration specified. Leave unchecked to let the command terminate naturally." %}{% endset %} {{ forms.checkbox("terminateCommand", title, module.getOption("terminateCommand"), helpText, "duration-fields") }} {% set title %}{% trans "Use taskkill to terminate commands?" %}{% endset %} {% set helpText %}{% trans "On Windows, should the player use taskkill to terminate commands." %}{% endset %} {{ forms.checkbox("useTaskkill", title, module.getOption("useTaskkill"), helpText, "duration-fields") }} {% 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 storedCommand %}{% trans "Stored Command" %}{% endset %} {% set createCommand %}{% trans "Create Command" %}{% endset %} {% set options = [ { id: "storedCommand", value: storedCommand }, { id: "createCommand", value: createCommand } ] %} {% set title %}{% trans "Command Type" %}{% endset %} {% set helpText %}{% trans "Pick a command type" %}{% endset %} {{ forms.dropdown("commandType", "single", title, module.getOption("commandType"), options, "id", "value", helpText) }} {% set title %}{% trans "Stored Command" %}{% endset %} {% set helpText %}{% trans "Pick a stored command" %}{% endset %} {{ forms.dropdown("commandCode", "single", title, module.getOption("commandCode"), [{code:"", command: ""}]|merge(commands), "code", "command", helpText, "stored-command-fields") }} <div class="new-command-fields"> {% set title %}{% trans "Use global command?" %}{% endset %} {% set helpText %}{% trans "Use a global command to work with all the player types." %}{% endset %} {{ forms.checkbox("useGlobalCommand", title, module.getOption("useGlobalCommand"), helpText, "") }} {% set title %}{% trans "Global Command" %}{% endset %} {% set helpText %}{% trans "Enter a global (Android/Linux/Tizen/webOS/Windows) Command Line compatible command" %}{% endset %} {{ forms.input("globalCommand", title, module.getOption("globalCommand")|url_decode, helpText, "global-command-show XiboCommand") }} {% set title %}{% trans "Android Command" %}{% endset %} {% set helpText %}{% trans "Enter an Android Command Line compatible command" %}{% endset %} {{ forms.input("androidCommand", title, module.getOption("androidCommand")|url_decode, helpText, "global-command-hide XiboCommand") }} {% set title %}{% trans "Linux Command" %}{% endset %} {% set helpText %}{% trans "Enter an Linux Command Line compatible command" %}{% endset %} {{ forms.input("linuxCommand", title, module.getOption("linuxCommand")|url_decode, helpText, "global-command-hide XiboCommand") }} {% set title %}{% trans "Tizen Command" %}{% endset %} {% set helpText %}{% trans "Enter a Tizen Command Line compatible command." %}{% endset %} {{ forms.input("tizenCommand", title, module.getOption('tizenCommand'), helpText, "global-command-hide XiboCommand") }} {% set title %}{% trans "webOS Command" %}{% endset %} {% set helpText %}{% trans "Enter a webOS Command Line compatible command." %}{% endset %} {{ forms.input("webosCommand", title, module.getOption('webosCommand'), helpText, "global-command-hide XiboCommand") }} {% set title %}{% trans "Windows Command" %}{% endset %} {% set helpText %}{% trans "Enter a Windows Command Line compatible command" %}{% endset %} {{ forms.input("windowsCommand", title, module.getOption("windowsCommand")|url_decode, helpText, "global-command-hide XiboCommand") }} </div> </div> <div class="tab-pane" id="advanceTab"> {% set title %}{% trans "Launch the command via Windows Command Line" %}{% endset %} {% set helpText %}{% trans "On Windows, should the player launch this command through the windows command line (cmd.exe)? This is useful for batch files. If you try to terminate this command only the command line will be terminated." %}{% endset %} {{ forms.checkbox("launchThroughCmd", title, module.getOption("launchThroughCmd", 1), helpText, "") }} </div> </div> </form> </div> </div> {% endblock %}