0byt3m1n1
Path:
/
home
/
mgatv524
/
www
/
mctv
/
views
/
[
Home
]
File: applications-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 "Edit Application" %} {% endblock %} {% block formButtons %} {% trans "Help" %}, XiboHelpRender("{{ help }}") {% trans "Cancel" %}, XiboDialogClose() {% trans "Save" %}, $("#applicationFormSubmit").submit() {% endblock %} {% block callBack %}copyFromSecretInput{% endblock %} {% block formHtml %} <div class="row"> <div class="col-md-12"> <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="#scopes" role="tab" data-toggle="tab"><span>{% trans "Sharing" %}</span></a></li> </ul> <form id="applicationFormSubmit" class="XiboForm form-horizontal" method="put" action="{{ url_for("application.edit", {id: client.key}) }}"> <div class="tab-content"> <div class="tab-pane active" id="general"> {% set title %}{% trans "Application Name" %}{% endset %} {{ forms.input("name", title, client.name) }} {% set title %}{% trans "Client Id" %}{% endset %} {{ forms.disabled("clientId", title, client.key, "", "", "disabled") }} {% set title %}{% trans "Client Secret" %}{% endset %} {% set buttonTitle %}{% trans "Copy to Clipboard" %}{% endset %} {{ forms.inputWithButton("clientSecret", title, client.secret, "", "", "readonly='readonly'", "", "copy-button", buttonTitle, "button", "") }} {% set title %}{% trans "Reset Secret?" %}{% endset %} {% set helpText %}{% trans "Reset your client secret to prevent access from any existing application." %}{% endset %} {{ forms.checkbox("resetKeys", title, 0, helpText) }} {% set title %}{% trans "Authorization Code?" %}{% endset %} {% set helpText %}{% trans "Allow the Authorization Code Grant for this Client?" %}{% endset %} {{ forms.checkbox("authCode", title, client.authCode, helpText) }} {% set title %}{% trans "Client Credentials?" %}{% endset %} {% set helpText %}{% trans "Allow the Client Credentials Grant for this Client?" %}{% endset %} {{ forms.checkbox("clientCredentials", title, client.clientCredentials, helpText) }} {% set title %}{% trans "Is Confidential?" %}{% endset %} {% set helpText %}{% trans "Can this Application keep a secret?" %}{% endset %} {{ forms.checkbox("isConfidential", title, client.isConfidential, helpText) }} {% set title %}{% trans "New Redirect URI" %}{% endset %} {% set helpText %}{% trans "White listed redirect URI's that will be allowed, only application for Authorization Code Grants" %}{% endset %} {{ forms.input("redirectUri[]", title, "", helpText) }} <div class="form-group row"> <span class="control-label col-sm-2">{{ "Existing Redirect URI"|trans }}:</span> </div> {% for url in client.redirectUris %} {{ forms.input("redirectUri[]", "", url.redirectUri) }} {% endfor %} </div> <div class="tab-pane" id="scopes"> {% set message %}{% trans "Select sharing to grant to this application (scopes)." %}{% endset %} {{ forms.message(message) }} <div class="form-group row"> <span class="control-label col-sm-2">{{ "Scopes"|trans }}:</span> </div> {% for scope in scopes %} {% set title %}{{ scope.description }}{% endset %} {% set id %}scope_{{ scope.id }}{% endset %} {{ forms.checkbox(id, title, scope.selected) }} {% endfor %} {% set title %}{% trans "Owner" %}{% endset %} {% set helpText %}{% trans "Set the owner of this Application. If you are not an admin you will not be able to reverse this action." %}{% endset %} {% set users = [{userId: null, user: ""}]|merge(users) %} {{ forms.dropdown("userId", "single", title, "", users, "userId", "userName", helpText) }} </div> </div> </form> </div> </div> {% endblock %}