{# /* * Spring Signage Ltd - http://www.springsignage.com * Copyright (C) 2015 Spring Signage Ltd * (${FILE_NAME}) */ #} {% 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 %}
{% 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 "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) }}
{% set message %}{% trans "Select permissions to grant to this application (scopes)." %}{% endset %} {{ forms.message(message) }} {% for url in client.redirectUris %} {% set title %}{% trans "Redirect URI" %}{% endset %} {{ forms.input("redirectUri[]", title, url.redirectUri) }} {% endfor %} {% 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) }}
{% endblock %}