Fix erblint errors on the app/views/doorkeeper folder (#8399)

This commit is contained in:
Alberto Pérez de Rada Fiol 2020-06-11 17:34:31 +02:00 committed by GitHub
parent f647944046
commit c9bb331248
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 43 additions and 43 deletions

View file

@ -1,6 +1,6 @@
<%- submit_btn_css ||= 'btn btn-link' %>
<%- submit_btn_css ||= "btn btn-link" %>
<%= form_tag oauth_application_path(application), method: :delete do %>
<%= submit_tag t('doorkeeper.applications.buttons.destroy'),
onclick: "return confirm('#{ t('doorkeeper.applications.confirmations.destroy') }')",
<%= submit_tag t("doorkeeper.applications.buttons.destroy"),
onclick: "return confirm('#{t('doorkeeper.applications.confirmations.destroy')}')",
class: submit_btn_css %>
<% end %>

View file

@ -1,65 +1,65 @@
<%= form_for application, url: doorkeeper_submit_path(application), html: { role: 'form' } do |f| %>
<%= form_for application, url: doorkeeper_submit_path(application), html: { role: "form" } do |f| %>
<% if application.errors.any? %>
<div class="alert alert-danger" data-alert><p><%= t('doorkeeper.applications.form.error') %></p></div>
<div class="alert alert-danger" data-alert><p><%= t("doorkeeper.applications.form.error") %></p></div>
<% end %>
<div class="form-group row">
<%= f.label :name, class: 'col-sm-2 col-form-label font-weight-bold' %>
<%= f.label :name, class: "col-sm-2 col-form-label font-weight-bold" %>
<div class="col-sm-10">
<%= f.text_field :name, class: "form-control #{ 'is-invalid' if application.errors[:name].present? }", required: true %>
<%= f.text_field :name, class: "form-control #{'is-invalid' if application.errors[:name].present?}", required: true %>
<%= doorkeeper_errors_for application, :name %>
</div>
</div>
<div class="form-group row">
<%= f.label :redirect_uri, class: 'col-sm-2 col-form-label font-weight-bold' %>
<%= f.label :redirect_uri, class: "col-sm-2 col-form-label font-weight-bold" %>
<div class="col-sm-10">
<%= f.text_area :redirect_uri, class: "form-control #{ 'is-invalid' if application.errors[:redirect_uri].present? }" %>
<%= f.text_area :redirect_uri, class: "form-control #{'is-invalid' if application.errors[:redirect_uri].present?}" %>
<%= doorkeeper_errors_for application, :redirect_uri %>
<span class="form-text text-secondary">
<%= t('doorkeeper.applications.help.redirect_uri') %>
<%= t("doorkeeper.applications.help.redirect_uri") %>
</span>
<% if Doorkeeper.configuration.native_redirect_uri %>
<span class="form-text text-secondary">
<%= raw t('doorkeeper.applications.help.native_redirect_uri', native_redirect_uri: content_tag(:code, class: 'bg-light') { Doorkeeper.configuration.native_redirect_uri }) %>
<%= raw t("doorkeeper.applications.help.native_redirect_uri", native_redirect_uri: content_tag(:code, class: "bg-light") { Doorkeeper.configuration.native_redirect_uri }) %>
</span>
<% end %>
<% if Doorkeeper.configuration.allow_blank_redirect_uri?(application) %>
<span class="form-text text-secondary">
<%= t('doorkeeper.applications.help.blank_redirect_uri') %>
<%= t("doorkeeper.applications.help.blank_redirect_uri") %>
</span>
<% end %>
</div>
</div>
<div class="form-group row">
<%= f.label :confidential, class: 'col-sm-2 form-check-label font-weight-bold' %>
<%= f.label :confidential, class: "col-sm-2 form-check-label font-weight-bold" %>
<div class="col-sm-10">
<%= f.check_box :confidential, class: "checkbox #{ 'is-invalid' if application.errors[:confidential].present? }" %>
<%= f.check_box :confidential, class: "checkbox #{'is-invalid' if application.errors[:confidential].present?}" %>
<%= doorkeeper_errors_for application, :confidential %>
<span class="form-text text-secondary">
<%= t('doorkeeper.applications.help.confidential') %>
<%= t("doorkeeper.applications.help.confidential") %>
</span>
</div>
</div>
<div class="form-group row">
<%= f.label :scopes, class: 'col-sm-2 col-form-label font-weight-bold' %>
<%= f.label :scopes, class: "col-sm-2 col-form-label font-weight-bold" %>
<div class="col-sm-10">
<%= f.text_field :scopes, class: "form-control #{ 'has-error' if application.errors[:scopes].present? }" %>
<%= f.text_field :scopes, class: "form-control #{'has-error' if application.errors[:scopes].present?}" %>
<%= doorkeeper_errors_for application, :scopes %>
<span class="form-text text-secondary">
<%= t('doorkeeper.applications.help.scopes') %>
<%= t("doorkeeper.applications.help.scopes") %>
</span>
</div>
</div>
<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-secondary' %>
<%= f.submit t("doorkeeper.applications.buttons.submit"), class: "btn btn-primary" %>
<%= link_to t("doorkeeper.applications.buttons.cancel"), oauth_applications_path, class: "btn btn-secondary" %>
</div>
</div>
<% end %>

View file

@ -1,5 +1,5 @@
<div class="border-bottom mb-4">
<h1><%= t('.title') %></h1>
<h1><%= t(".title") %></h1>
</div>
<%= render 'form', application: @application %>
<%= render "form", application: @application %>

View file

@ -1,16 +1,16 @@
<div class="border-bottom mb-4">
<h1><%= t('.title') %></h1>
<h1><%= t(".title") %></h1>
</div>
<p><%= link_to t('.new'), new_oauth_application_path, class: 'btn btn-success' %></p>
<p><%= link_to t(".new"), new_oauth_application_path, class: "btn btn-success" %></p>
<table class="table table-striped">
<thead>
<tr>
<th><%= t('.name') %></th>
<th><%= t('.callback_url') %></th>
<th><%= t('.confidential') %></th>
<th><%= t('.actions') %></th>
<th><%= t(".name") %></th>
<th><%= t(".callback_url") %></th>
<th><%= t(".confidential") %></th>
<th><%= t(".actions") %></th>
<th></th>
</tr>
</thead>
@ -24,13 +24,13 @@
<%= simple_format(application.redirect_uri) %>
</td>
<td class="align-middle">
<%= application.confidential? ? t('doorkeeper.applications.index.confidentiality.yes') : t('doorkeeper.applications.index.confidentiality.no') %>
<%= application.confidential? ? t("doorkeeper.applications.index.confidentiality.yes") : t("doorkeeper.applications.index.confidentiality.no") %>
</td>
<td class="align-middle">
<%= link_to t('doorkeeper.applications.buttons.edit'), edit_oauth_application_path(application), class: 'btn btn-link' %>
<%= link_to t("doorkeeper.applications.buttons.edit"), edit_oauth_application_path(application), class: "btn btn-link" %>
</td>
<td class="align-middle">
<%= render 'delete_form', application: application %>
<%= render "delete_form", application: application %>
</td>
</tr>
<% end %>

View file

@ -1,5 +1,5 @@
<div class="border-bottom mb-4">
<h1><%= t('.title') %></h1>
<h1><%= t(".title") %></h1>
</div>
<%= render 'form', application: @application %>
<%= render "form", application: @application %>

View file

@ -1,5 +1,5 @@
<div class="border-bottom mb-4">
<h1><%= t('doorkeeper.authorizations.error.title') %></h1>
<h1><%= t("doorkeeper.authorizations.error.title") %></h1>
</div>
<main role="main">

View file

@ -43,7 +43,7 @@
</style>
<header class="page-header" role="banner">
<img src="<%= cloudinary("https://thepracticaldev.s3.amazonaws.com/i/9bsnlmppunw39rnnshk6.png") %>"/>
<img src="<%= cloudinary("https://thepracticaldev.s3.amazonaws.com/i/9bsnlmppunw39rnnshk6.png") %>" />
</header>
<main role="main">

View file

@ -1,5 +1,5 @@
<header class="page-header">
<h1><%= t('.title') %>:</h1>
<h1><%= t(".title") %>:</h1>
</header>
<main role="main">

View file

@ -1,4 +1,4 @@
<%- submit_btn_css ||= 'btn btn-link' %>
<%- submit_btn_css ||= "btn btn-link" %>
<%= form_tag oauth_authorized_application_path(application), method: :delete do %>
<%= submit_tag t('doorkeeper.authorized_applications.buttons.revoke'), onclick: "return confirm('#{ t('doorkeeper.authorized_applications.confirmations.revoke') }')", class: submit_btn_css %>
<%= submit_tag t("doorkeeper.authorized_applications.buttons.revoke"), onclick: "return confirm('#{t('doorkeeper.authorized_applications.confirmations.revoke')}')", class: submit_btn_css %>
<% end %>

View file

@ -1,13 +1,13 @@
<header class="page-header">
<h1><%= t('doorkeeper.authorized_applications.index.title') %></h1>
<h1><%= t("doorkeeper.authorized_applications.index.title") %></h1>
</header>
<main role="main">
<table class="table table-striped">
<thead>
<tr>
<th><%= t('doorkeeper.authorized_applications.index.application') %></th>
<th><%= t('doorkeeper.authorized_applications.index.created_at') %></th>
<th><%= t("doorkeeper.authorized_applications.index.application") %></th>
<th><%= t("doorkeeper.authorized_applications.index.created_at") %></th>
<th></th>
</tr>
</thead>
@ -15,8 +15,8 @@
<% @applications.each do |application| %>
<tr>
<td><%= application.name %></td>
<td><%= application.created_at.strftime(t('doorkeeper.authorized_applications.index.date_format')) %></td>
<td><%= render 'delete_form', application: application %></td>
<td><%= application.created_at.strftime(t("doorkeeper.authorized_applications.index.date_format")) %></td>
<td><%= render "delete_form", application: application %></td>
</tr>
<% end %>
</tbody>