Replace ERB by HAML, added locales, corrected Gemfile
This commit is contained in:
parent
3d26cbf657
commit
c6eb722517
6 changed files with 30 additions and 25 deletions
7
app/views/openid_connect/authorizations/_form.haml
Normal file
7
app/views/openid_connect/authorizations/_form.haml
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
= form_tag openid_connect_authorizations_path, class: action do
|
||||||
|
- if action == :approve
|
||||||
|
= submit_tag t(".approve")
|
||||||
|
= hidden_field_tag :approve, true
|
||||||
|
- else
|
||||||
|
= submit_tag t(".deny")
|
||||||
|
= hidden_field_tag :approve, false
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
<%= form_tag openid_connect_authorizations_path, class: action do %>
|
|
||||||
<% if action == :approve %>
|
|
||||||
<%= submit_tag "Approve" %>
|
|
||||||
<%= hidden_field_tag :approve, true %>
|
|
||||||
<% else %>
|
|
||||||
<%= submit_tag "Deny" %>
|
|
||||||
<%= hidden_field_tag :approve, false %>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
<h2><%= @client.name %></h2>
|
|
||||||
<p>You will be redirected to <%= @redirect_uri %> with an id token if approved or an error if denied</p>
|
|
||||||
<ul>
|
|
||||||
<% @scopes.each do |scope| %>
|
|
||||||
<li><%= scope.name %></li>
|
|
||||||
<% end %>
|
|
||||||
<% if @request_object %>
|
|
||||||
<li>Request Objects (Currently not supported)</li>
|
|
||||||
<ul>
|
|
||||||
<pre><%= JSON.pretty_generate @request_object.as_json %></pre>
|
|
||||||
</ul>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
<%= render 'openid_connect/authorizations/form', action: :approve %>
|
|
||||||
<%= render 'openid_connect/authorizations/form', action: :deny %>
|
|
||||||
14
app/views/openid_connect/authorizations/new.html.haml
Normal file
14
app/views/openid_connect/authorizations/new.html.haml
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
%h2= @client.name
|
||||||
|
%p= t(".will_be_redirected")
|
||||||
|
= @redirect_uri
|
||||||
|
= t(".with_id_token")
|
||||||
|
%ul
|
||||||
|
- @scopes.each do |scope|
|
||||||
|
%li= scope.name
|
||||||
|
- if @request_object
|
||||||
|
%li= t(".requested_objects")
|
||||||
|
%ul
|
||||||
|
%pre= JSON.pretty_generate @request_object.as_json
|
||||||
|
|
||||||
|
= render 'openid_connect/authorizations/form', action: :approve
|
||||||
|
= render 'openid_connect/authorizations/form', action: :deny
|
||||||
|
|
@ -31,7 +31,6 @@ module Diaspora
|
||||||
# Custom directories with classes and modules you want to be autoloadable.
|
# Custom directories with classes and modules you want to be autoloadable.
|
||||||
config.autoload_paths += %W{#{config.root}/app}
|
config.autoload_paths += %W{#{config.root}/app}
|
||||||
config.autoload_once_paths += %W{#{config.root}/lib}
|
config.autoload_once_paths += %W{#{config.root}/lib}
|
||||||
config.autoload_paths += %W{#{config.root}/lib/openid}
|
|
||||||
|
|
||||||
# Only load the plugins named here, in the order given (default is alphabetical).
|
# Only load the plugins named here, in the order given (default is alphabetical).
|
||||||
# :all can be used as a placeholder for all plugins not explicitly named.
|
# :all can be used as a placeholder for all plugins not explicitly named.
|
||||||
|
|
|
||||||
|
|
@ -881,6 +881,15 @@ en:
|
||||||
Hoping to see you again,
|
Hoping to see you again,
|
||||||
|
|
||||||
The diaspora* email robot!
|
The diaspora* email robot!
|
||||||
|
openid_connect:
|
||||||
|
authorizations:
|
||||||
|
new:
|
||||||
|
will_be_redirected: "You will be redirected to"
|
||||||
|
with_id_token: "with an id token if approved or an error if denied"
|
||||||
|
requested_objects: "Request Objects (Currently not supported)"
|
||||||
|
form:
|
||||||
|
approve: "Approve"
|
||||||
|
deny: "Deny"
|
||||||
people:
|
people:
|
||||||
zero: "No people"
|
zero: "No people"
|
||||||
one: "1 person"
|
one: "1 person"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue