diff options
Diffstat (limited to 'app/Resources/FOSOAuthServerBundle/views')
-rw-r--r-- | app/Resources/FOSOAuthServerBundle/views/Authorize/authorize.html.twig | 7 | ||||
-rw-r--r-- | app/Resources/FOSOAuthServerBundle/views/Authorize/authorize_content.html.twig | 53 |
2 files changed, 60 insertions, 0 deletions
diff --git a/app/Resources/FOSOAuthServerBundle/views/Authorize/authorize.html.twig b/app/Resources/FOSOAuthServerBundle/views/Authorize/authorize.html.twig new file mode 100644 index 00000000..42566a05 --- /dev/null +++ b/app/Resources/FOSOAuthServerBundle/views/Authorize/authorize.html.twig | |||
@@ -0,0 +1,7 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block title %}{{ 'developer.client.page_title'|trans }}{% endblock %} | ||
4 | |||
5 | {% block content %} | ||
6 | {% include "FOSOAuthServerBundle:Authorize:authorize_content.html.twig" %} | ||
7 | {% endblock content %} | ||
diff --git a/app/Resources/FOSOAuthServerBundle/views/Authorize/authorize_content.html.twig b/app/Resources/FOSOAuthServerBundle/views/Authorize/authorize_content.html.twig new file mode 100644 index 00000000..d7f2dbe0 --- /dev/null +++ b/app/Resources/FOSOAuthServerBundle/views/Authorize/authorize_content.html.twig | |||
@@ -0,0 +1,53 @@ | |||
1 | <div class="row"> | ||
2 | <div class="col s12"> | ||
3 | <h4>A new application would like to connect to your account</h4> | ||
4 | |||
5 | <div class="center-align col l6 offset-l3"> | ||
6 | <div class="row"> | ||
7 | <ul class="collection"> | ||
8 | <li class="collection-item avatar"> | ||
9 | {% if client.image %} | ||
10 | <img src="{{ client.image }}" alt="Client icon" class="circle"> | ||
11 | {% endif %} | ||
12 | <span class="title">{{ client.name }}</span> | ||
13 | <p>{{ client.description }}</p> | ||
14 | </li> | ||
15 | </ul> | ||
16 | {% set scopes = form.scope.vars.value | split(' ') %} | ||
17 | {# TODO : Fix me when https://github.com/FriendsOfSymfony/FOSOAuthServerBundle/issues/309 is ok #} | ||
18 | <ul class="collapsible col s12 m12 l6 offset-l3" data-collapsible="accordion"> | ||
19 | {% for scope in scopes %} | ||
20 | {% if scope == 'read' %} | ||
21 | <li> | ||
22 | <div class="collapsible-header"><i class="material-icons">visibility</i>Read Permission</div> | ||
23 | <div class="collapsible-body"><span>{{ client.name }} will be able to access the list and contents of your entries, tags and annotations.</span></div> | ||
24 | </li> | ||
25 | {% endif %} | ||
26 | {% if scope == 'write' %} | ||
27 | <li> | ||
28 | <div class="collapsible-header"><i class="material-icons">edit</i>Edit Permission</div> | ||
29 | <div class="collapsible-body"><span>{{ client.name }} will be able to edit and manage (including deleting) your entries, tags and annotations.</span></div> | ||
30 | </li> | ||
31 | {% endif %} | ||
32 | {% if scope == 'user' %} | ||
33 | <li> | ||
34 | <div class="collapsible-header"><i class="material-icons">person</i>User Permission</div> | ||
35 | <div class="collapsible-body"><span>{{ client.name }} will be able to manage your user account.</span></div> | ||
36 | </li> | ||
37 | {% endif %} | ||
38 | {% endfor %} | ||
39 | </ul> | ||
40 | </div> | ||
41 | {{ form_start(form, {'method': 'POST', 'action': path('fos_oauth_server_authorize'), 'label_attr': {'class': 'fos_oauth_server_authorize'} }) }} | ||
42 | <input class="waves-effect waves-light btn red" type="submit" name="rejected" value="{{ 'authorize.reject'|trans({}, 'FOSOAuthServerBundle') }}" /> | ||
43 | <input class="waves-effect waves-light btn" type="submit" name="accepted" value="{{ 'authorize.accept'|trans({}, 'FOSOAuthServerBundle') }}" /> | ||
44 | {{ form_row(form.client_id) }} | ||
45 | {{ form_row(form.response_type) }} | ||
46 | {{ form_row(form.redirect_uri) }} | ||
47 | {{ form_row(form.state) }} | ||
48 | {{ form_row(form.scope) }} | ||
49 | {{ form_rest(form) }} | ||
50 | </form> | ||
51 | </div> | ||
52 | </div> | ||
53 | </div> | ||