cirandas.net

ref: master

plugins/oauth_provider/views/doorkeeper/applications/_form.html.erb


<% extend Doorkeeper::DashboardHelper %>
<%= form_for application, url: doorkeeper_submit_path(application), html: {class: 'form-horizontal', role: 'form'} do |f| %>
  <% if application.errors.any? %>
    

<%= _('Whoops! Check your form for possible errors') %>

<% end %> <%= content_tag :div, class: "form-group#{' has-error' if application.errors[:name].present?}" do %> <%= f.label :name, class: 'col-sm-2 control-label' %>
<%= f.text_field :name, class: 'form-control' %> <%= doorkeeper_errors_for application, :name %>
<% 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' %>
<%= f.text_area :redirect_uri, class: 'form-control' %> <%= doorkeeper_errors_for application, :redirect_uri %> <%= _('Use one line per URI') %> <% if Doorkeeper.configuration.native_redirect_uri %> <%= raw _('Use %s to local tests') % "#{ Doorkeeper.configuration.native_redirect_uri }" %> <% end %>
<% end %> <%= content_tag :div, class: "form-group#{' has-error' if application.errors[:scopes].present?}" do %> <%= f.label :scopes, class: 'col-sm-2 control-label' %>
<%= f.text_field :scopes, class: 'form-control' %> <%= doorkeeper_errors_for application, :scopes %> <%= _('Separate scopes with spaces. Leave blank to use the default scopes.') %>
<% end %>
<%= f.submit _('Submit'), class: "btn btn-primary" %> <%= link_to _('Cancel'), oauth_applications_path, :class => "btn btn-default" %>
<% end %>