parent
3441361568
commit
25d7c1b6ea
@ -1,5 +0,0 @@ |
||||
<%- submit_btn_css ||= 'btn btn-link' %> |
||||
<%= form_tag oauth_application_path(application) do %> |
||||
<input type="hidden" name="_method" value="delete"> |
||||
<%= submit_tag t('doorkeeper.applications.buttons.destroy'), onclick: "return confirm('#{ t('doorkeeper.applications.confirmations.destroy') }')", class: submit_btn_css %> |
||||
<% end %> |
@ -1,47 +0,0 @@ |
||||
<%= form_for application, url: doorkeeper_submit_path(application), html: {class: 'form-horizontal', role: 'form'} do |f| %> |
||||
<% if application.errors.any? %> |
||||
<div class="alert alert-danger" data-alert><p><%= t('doorkeeper.applications.form.error') %></p></div> |
||||
<% end %> |
||||
|
||||
<%= content_tag :div, class: "form-group#{' has-error' if application.errors[:name].present?}" do %> |
||||
<%= f.label :name, class: 'col-sm-2 control-label' %> |
||||
<div class="col-sm-10"> |
||||
<%= f.text_field :name, class: 'form-control' %> |
||||
<%= doorkeeper_errors_for application, :name %> |
||||
</div> |
||||
<% end %> |
||||
|
||||
<%= content_tag :div, class: "form-group#{' has-error' if application.errors[:redirect_uri].present?}" do %> |
||||
<%= f.label :redirect_uri, class: 'col-sm-2 control-label' %> |
||||
<div class="col-sm-10"> |
||||
<%= f.text_area :redirect_uri, class: 'form-control' %> |
||||
<%= doorkeeper_errors_for application, :redirect_uri %> |
||||
<span class="help-block"> |
||||
<%= t('doorkeeper.applications.help.redirect_uri') %> |
||||
</span> |
||||
<% if Doorkeeper.configuration.native_redirect_uri %> |
||||
<span class="help-block"> |
||||
<%= raw t('doorkeeper.applications.help.native_redirect_uri', native_redirect_uri: "<code>#{ Doorkeeper.configuration.native_redirect_uri }</code>") %> |
||||
</span> |
||||
<% end %> |
||||
</div> |
||||
<% end %> |
||||
|
||||
<%= content_tag :div, class: "form-group#{' has-error' if application.errors[:scopes].present?}" do %> |
||||
<%= f.label :scopes, class: 'col-sm-2 control-label' %> |
||||
<div class="col-sm-10"> |
||||
<%= f.text_field :scopes, class: 'form-control' %> |
||||
<%= doorkeeper_errors_for application, :scopes %> |
||||
<span class="help-block"> |
||||
<%= t('doorkeeper.applications.help.scopes') %> |
||||
</span> |
||||
</div> |
||||
<% end %> |
||||
|
||||
<div class="form-group"> |
||||
<div class="col-sm-offset-2 col-sm-10"> |
||||
<%= f.submit t('doorkeeper.applications.buttons.submit'), class: "btn btn-primary" %> |
||||
<%= link_to t('doorkeeper.applications.buttons.cancel'), oauth_applications_path, :class => "btn btn-default" %> |
||||
</div> |
||||
</div> |
||||
<% end %> |
@ -0,0 +1,9 @@ |
||||
= simple_form_for application, url: doorkeeper_submit_path(application) do |f| |
||||
= f.error_notification |
||||
|
||||
.form-inputs |
||||
= f.input :name |
||||
= f.input :redirect_uri, hint: t('doorkeeper.applications.help.redirect_uri') |
||||
= f.input :scopes, hint: t('doorkeeper.applications.help.scopes') |
||||
.form-actions |
||||
= f.button :submit, 'Save' |
@ -1,5 +0,0 @@ |
||||
<div class="page-header"> |
||||
<h1><%= t('.title') %></h1> |
||||
</div> |
||||
|
||||
<%= render 'form', application: @application %> |
@ -0,0 +1,4 @@ |
||||
- content_for :page_title do |
||||
Edit app |
||||
|
||||
= render 'form', application: @application |
@ -1,5 +0,0 @@ |
||||
<div class="page-header"> |
||||
<h1><%= t('.title') %></h1> |
||||
</div> |
||||
|
||||
<%= render 'form', application: @application %> |
@ -0,0 +1,4 @@ |
||||
- content_for :page_title do |
||||
New app |
||||
|
||||
= render 'form', application: @application |
@ -1,39 +0,0 @@ |
||||
<div class="page-header"> |
||||
<h1><%= t('.title', name: @application.name) %></h1> |
||||
</div> |
||||
|
||||
<div class="row"> |
||||
<div class="col-md-8"> |
||||
<h4><%= t('.application_id') %>:</h4> |
||||
<p><code id="application_id"><%= @application.uid %></code></p> |
||||
|
||||
<h4><%= t('.secret') %>:</h4> |
||||
<p><code id="secret"><%= @application.secret %></code></p> |
||||
|
||||
<h4><%= t('.scopes') %>:</h4> |
||||
<p><code id="scopes"><%= @application.scopes %></code></p> |
||||
|
||||
<h4><%= t('.callback_urls') %>:</h4> |
||||
|
||||
<table> |
||||
<% @application.redirect_uri.split.each do |uri| %> |
||||
<tr> |
||||
<td> |
||||
<code><%= uri %></code> |
||||
</td> |
||||
<td> |
||||
<%= link_to t('doorkeeper.applications.buttons.authorize'), oauth_authorization_path(client_id: @application.uid, redirect_uri: uri, response_type: 'code'), class: 'btn btn-success', target: '_blank' %> |
||||
</td> |
||||
</tr> |
||||
<% end %> |
||||
</table> |
||||
</div> |
||||
|
||||
<div class="col-md-4"> |
||||
<h3><%= t('.actions') %></h3> |
||||
|
||||
<p><%= link_to t('doorkeeper.applications.buttons.edit'), edit_oauth_application_path(@application), class: 'btn btn-primary' %></p> |
||||
|
||||
<p><%= render 'delete_form', application: @application, submit_btn_css: 'btn btn-danger' %></p> |
||||
</div> |
||||
</div> |
@ -0,0 +1,35 @@ |
||||
- content_for :page_title do |
||||
= @application.name |
||||
|
||||
.row |
||||
.panel |
||||
.panel-heading General |
||||
.panel-row |
||||
%dt Name |
||||
%dd= @application.name |
||||
.panel-row |
||||
%dt Scopes: |
||||
%dd= @application.scopes |
||||
|
||||
.panel.panel-full |
||||
.panel-heading Details |
||||
.panel-row |
||||
%dt Client ID: |
||||
%dd |
||||
%samp= @application.uid |
||||
.panel-row |
||||
%dt Secret: |
||||
%dd |
||||
%samp= @application.secret |
||||
|
||||
.panel.panel-full |
||||
.panel-heading Callback URLs |
||||
- @application.redirect_uri.split.each do |uri| |
||||
.panel-row.panel-row-wider |
||||
%dt |
||||
%samp= uri |
||||
%dd= link_to 'Authorize', oauth_authorization_path(client_id: @application.uid, redirect_uri: uri, response_type: 'code') |
||||
|
||||
.page-actions |
||||
= link_to fa_icon('edit'), edit_oauth_application_path(@application), class: 'btn btn-iconized' |
||||
= link_to fa_icon('trash'), oauth_application_path(@application), method: :delete, class: 'btn btn-iconized', data: { confirm: 'Are you sure?' } |
@ -1,3 +0,0 @@ |
||||
= form_tag oauth_authorized_application_path(application) do |
||||
%input{type: "hidden", name: "_method", value: "delete"} |
||||
= submit_tag 'Revoke', class: 'btn' |
@ -1,6 +1,14 @@ |
||||
- content_for :page_title do |
||||
Edit profile |
||||
|
||||
= simple_form_for @account, url: settings_path, method: :put do |f| |
||||
= f.input :display_name |
||||
= f.input :note |
||||
= f.input :avatar |
||||
= f.input :header |
||||
= f.button :submit |
||||
= f.error_notification |
||||
|
||||
.form-inputs |
||||
= f.input :display_name |
||||
= f.input :note |
||||
= f.input :avatar |
||||
= f.input :header |
||||
|
||||
.form-actions |
||||
= f.button :submit, 'Save changes' |
||||
|
Loading…
Reference in new issue