2016-03-25 00:16:27 +00:00
|
|
|
<div id="yield">
|
2018-03-05 17:33:16 +00:00
|
|
|
<div className="centerContent">
|
|
|
|
<header className="page-header" role="banner">
|
2018-03-04 02:25:42 +00:00
|
|
|
<h1>{ t('.title') }</h1>
|
2016-03-25 00:16:27 +00:00
|
|
|
</header>
|
|
|
|
|
|
|
|
<main role="main">
|
2018-03-05 17:33:16 +00:00
|
|
|
<p className="h4">
|
|
|
|
{ raw t('.prompt', client_name: "<strong className=\"text-info\">#{ @pre_auth.client.name }</strong>") }
|
2016-03-25 00:16:27 +00:00
|
|
|
</p>
|
|
|
|
|
2018-03-04 02:25:42 +00:00
|
|
|
{ if @pre_auth.scopes.count > 0 }
|
2016-03-25 00:16:27 +00:00
|
|
|
<div id="oauth-permissions">
|
2018-03-04 02:25:42 +00:00
|
|
|
<p>{ t('.able_to') }:</p>
|
2016-03-25 00:16:27 +00:00
|
|
|
|
2018-03-05 17:33:16 +00:00
|
|
|
<ul className="text-info">
|
2018-03-04 02:25:42 +00:00
|
|
|
{ @pre_auth.scopes.each do |scope| }
|
|
|
|
<li>{ t scope, scope: [:doorkeeper, :scopes] }</li>
|
|
|
|
{ end }
|
2016-03-25 00:16:27 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
2018-03-04 02:25:42 +00:00
|
|
|
{ end }
|
2016-03-25 00:16:27 +00:00
|
|
|
|
2018-03-05 17:33:16 +00:00
|
|
|
<div className="actions">
|
|
|
|
<div className="inline-button button-margin-top">
|
2018-03-04 02:25:42 +00:00
|
|
|
{ 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 }
|
2018-03-05 17:33:16 +00:00
|
|
|
{ submit_tag t('doorkeeper.authorizations.buttons.authorize'), className: "button" }
|
2018-03-04 02:25:42 +00:00
|
|
|
{ end }
|
2016-03-25 00:16:27 +00:00
|
|
|
</div>
|
2018-03-05 17:33:16 +00:00
|
|
|
<div className="inline-button button-margin-top">
|
2018-03-04 02:25:42 +00:00
|
|
|
{ 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 }
|
2018-03-05 17:33:16 +00:00
|
|
|
{ submit_tag t('doorkeeper.authorizations.buttons.deny'), className: "button red-button" }
|
2018-03-04 02:25:42 +00:00
|
|
|
{ end }
|
2016-03-25 00:16:27 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</main>
|
|
|
|
</div>
|
|
|
|
</div>
|