{% 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 message %}{% trans "Selecting only one of the Authorisation Code or Client Credentials grants improves security by allowing us to revoke access tokens more effectively." %}{% endset %}
{{ forms.message(message, "alert alert-info") }}
{% 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) }}
{{ "Existing Redirect URI"|trans }}:
{% for url in client.redirectUris %}
{{ forms.input("redirectUri[]", "", url.redirectUri) }}
{% endfor %}
{% set message %}{% trans "Below information will be displayed for User on Application authorization page" %}{% endset %}
{{ forms.message(message, "alert alert-info") }}
{% set title %}{% trans "Application Description" %}{% endset %}
{{ forms.textarea("description", title, client.description, title) }}
{% set title %}{% trans "Logo" %}{% endset %}
{% set helpText %}{% trans "Url pointing to the logo" %}{% endset %}
{{ forms.input("logo", title, client.logo, helpText) }}
{% set title %}{% trans "Cover Image" %}{% endset %}
{% set helpText %}{% trans "Url pointing to the Cover Image" %}{% endset %}
{{ forms.input("coverImage", title, client.coverImage, helpText) }}
{% set title %}{% trans "Company Name" %}{% endset %}
{{ forms.input("companyName", title, client.companyName) }}
{% set title %}{% trans "Terms URL" %}{% endset %}
{% set helpText %}{% trans "Url pointing to the terms for this Application" %}{% endset %}
{{ forms.input("termsUrl", title, client.termsUrl, helpText) }}
{% set title %}{% trans "Privacy Url" %}{% endset %}
{% set helpText %}{% trans "Url pointing to the privacy policy for this Application" %}{% endset %}
{{ forms.input("privacyUrl", title, client.privacyUrl, helpText) }}
{% set message %}{% trans "Select sharing to grant to this application (scopes)." %}{% endset %}
{{ forms.message(message, 'alert alert-info') }}
{% set message2 %}{% trans "Scopes grant the Application access to specific routes, all GET,POST and PUT calls for the selected scopes, will be available to use by this Application." %}{% endset %}
{{ forms.message(message2, 'alert alert-info') }}
{% set message3 %}{% trans "The delete scopes are separate, without these Application will not have access to delete any existing content" %}{% endset %}
{{ forms.message(message3, 'alert alert-info') }}
{{ "Scopes"|trans }}:
{% 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) }}