{% extends 'ClarolineCoreBundle::layout.html.twig' %}

{% block title %}{{ 'oauth_app_ask_access' | trans({}, 'api') ~ ' - ' ~ parent() | striptags | raw }}{% endblock %}

{% block content %}
    <div class="col-md-offset-4 col-md-4">
        <div class='content-element panel panel-default'>
            <div class="panel-heading">
                <h3 class="panel-title">{{ 'oauth_application_acceptance' | trans({}, "api")}}</h3>
            </div>
            <form role="form" action="{{ path('fos_oauth_server_authorize') }}" method="POST" class="fos_oauth_server_authorize" {{ form_enctype(form) }}>
            <div class="panel-body">
                <p>{{ 'app_want_access_to_your_account'|trans({'%clientName%': client.name}, 'api') }}</p>
                {{ form_row(form.client_id) }}
                {{ form_row(form.response_type) }}
                {{ form_row(form.redirect_uri) }}
                {{ form_row(form.state) }}
                {{ form_row(form.scope) }}
                {{ form_rest(form) }}
            </div>
            <div class="panel-footer text-center">
                <input type="submit" name="accepted" class="btn btn-success" value="{{ 'authorize.accept'|trans({}, 'FOSOAuthServerBundle') }}" />
                <input type="submit" name="rejected" class="btn btn-danger" value="{{ 'authorize.reject'|trans({}, 'FOSOAuthServerBundle') }}" />
            </div>
            </form>
        </div>
    </div>
{% endblock %}
