about summary refs log tree commit diff
path: root/app/views/doorkeeper/authorizations/new.html.haml
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-03-11 01:58:55 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-03-11 01:58:55 +0100
commitb919f39b3186c5f022d3965cf6023ff9041e91ca (patch)
tree797d63419822cb63a24e403ea47ab8b8f304fff9 /app/views/doorkeeper/authorizations/new.html.haml
parentd4b9b289e8a4db61dbed9c725ee602ee63515d15 (diff)
Customizing doorkeeper views for authorizing app
Diffstat (limited to 'app/views/doorkeeper/authorizations/new.html.haml')
-rw-r--r--app/views/doorkeeper/authorizations/new.html.haml26
1 files changed, 26 insertions, 0 deletions
diff --git a/app/views/doorkeeper/authorizations/new.html.haml b/app/views/doorkeeper/authorizations/new.html.haml
new file mode 100644
index 000000000..91d71cc01
--- /dev/null
+++ b/app/views/doorkeeper/authorizations/new.html.haml
@@ -0,0 +1,26 @@
+.prompt= raw t('.prompt', client_name: "<strong class=\"prompt-highlight\">#{ @pre_auth.client.name }</strong>")
+
+/- if @pre_auth.scopes.count > 0
+/  .scope-permission-prompt
+/    %p= t('.able_to')
+
+/    %ul.scope-permissions
+/      - @pre_auth.scopes.each do |scope|
+/        %li= t scope, scope: [:doorkeeper, :scopes]
+
+.actions
+  = form_tag oauth_authorization_path, method: :post do
+    = hidden_field_tag :client_id, @pre_auth.client.uid
+    = hidden_field_tag :redirect_uri, @pre_auth.redirect_uri
+    = hidden_field_tag :state, @pre_auth.state
+    = hidden_field_tag :response_type, @pre_auth.response_type
+    = hidden_field_tag :scope, @pre_auth.scope
+    = button_tag t('doorkeeper.authorizations.buttons.authorize'), type: :submit
+
+  = form_tag oauth_authorization_path, method: :delete do
+    = hidden_field_tag :client_id, @pre_auth.client.uid
+    = hidden_field_tag :redirect_uri, @pre_auth.redirect_uri
+    = hidden_field_tag :state, @pre_auth.state
+    = hidden_field_tag :response_type, @pre_auth.response_type
+    = hidden_field_tag :scope, @pre_auth.scope
+    = button_tag t('doorkeeper.authorizations.buttons.deny'), type: :submit, class: 'negative'