Fix lints in app/views/devise

This commit is contained in:
Andreas Nedbal 2020-05-10 13:45:48 +02:00
parent b67a291477
commit c585fe3760
16 changed files with 79 additions and 76 deletions

View file

@ -1,4 +1,4 @@
- provide(:title, generate_title("Resend confirmation instructions"))
- provide(:title, generate_title('Resend confirmation instructions'))
.container
.row
.col-sm-8.offset-sm-2
@ -8,8 +8,8 @@
= bootstrap_form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f|
= devise_error_messages!
= f.text_field :screen_name, autofocus: true, label: "User name"
= f.submit "Resend confirmation instructions", class: "btn btn-primary mb-3"
= f.text_field :screen_name, autofocus: true, label: 'User name'
= f.submit 'Resend confirmation instructions', class: 'btn btn-primary mb-3'
= render "devise/shared/links"
= render "shared/links"
= render 'devise/shared/links'
= render 'shared/links'

View file

@ -0,0 +1,10 @@
%p{ style: 'margin:0px;padding:0px' }
Welcome to
= succeed ',' do
= APP_CONFIG['site_name']
= succeed '!' do
= @resource.screen_name
%p  
%p{ style: 'margin:0px;padding:0px' } You can confirm your account email through the link below:
%p{ style: 'margin:0px;padding:0px' }
= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token, protocol: (APP_CONFIG['https'] ? :https : :http))

View file

@ -1,9 +0,0 @@
%p{style: "margin:0px;padding:0px"}
Welcome to
= succeed ',' do
= APP_CONFIG['site_name']
= succeed '!' do
= @resource.screen_name
%p  
%p{style: "margin:0px;padding:0px"} You can confirm your account email through the link below:
%p{style: "margin:0px;padding:0px"}= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token, protocol: (APP_CONFIG['https'] ? :https : :http))

View file

@ -0,0 +1,11 @@
%p{ style: 'margin:0px;padding:0px' }
Hello
= succeed '!' do
= @resource.screen_name
%p  
%p{ style: 'margin:0px;padding:0px' } Someone (hopefully you) has requested a link to change your password. You can do this through the link below.
%p{ style: 'margin:0px;padding:0px' }
= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token, protocol: (APP_CONFIG['https'] ? :https : :http))
%p  
%p{ style: 'margin:0px;padding:0px' } If you didn't request this, please ignore this email.
%p{ style: 'margin:0px;padding:0px' } Your password won't change until you access the link above and create a new one.

View file

@ -1,10 +0,0 @@
%p{style: "margin:0px;padding:0px"}
Hello
= succeed '!' do
= @resource.screen_name
%p  
%p{style: "margin:0px;padding:0px"} Someone (hopefully you) has requested a link to change your password. You can do this through the link below.
%p{style: "margin:0px;padding:0px"}= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token, protocol: (APP_CONFIG['https'] ? :https : :http))
%p  
%p{style: "margin:0px;padding:0px"} If you didn't request this, please ignore this email.
%p{style: "margin:0px;padding:0px"} Your password won't change until you access the link above and create a new one.

View file

@ -0,0 +1,9 @@
%p{ style: 'margin:0px;padding:0px' }
Hello
= succeed '!' do
= @resource.screen_name
%p  
%p{ style: 'margin:0px;padding:0px' } Your account has been locked due to an excessive number of unsuccessful sign in attempts.
%p{ style: 'margin:0px;padding:0px' } Click the link below to unlock your account:
%p{ style: 'margin:0px;padding:0px' }
= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token, protocol: (APP_CONFIG['https'] ? :https : :http))

View file

@ -1,8 +0,0 @@
%p{style: "margin:0px;padding:0px"}
Hello
= succeed '!' do
= @resource.screen_name
%p  
%p{style: "margin:0px;padding:0px"} Your account has been locked due to an excessive number of unsuccessful sign in attempts.
%p{style: "margin:0px;padding:0px"} Click the link below to unlock your account:
%p{style: "margin:0px;padding:0px"}= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token, protocol: (APP_CONFIG['https'] ? :https : :http))

View file

@ -1,4 +1,4 @@
- provide(:title, generate_title("Reset Password"))
- provide(:title, generate_title('Reset Password'))
.container
.row
.col-sm-4.offset-sm-4
@ -10,10 +10,10 @@
= f.hidden_field :reset_password_token
= f.password_field :password, autofocus: true, autocomplete: "off", label: "New password"
= f.password_field :password_confirmation, autocomplete: "off", label: "Confirm new password"
= f.password_field :password, autofocus: true, autocomplete: 'off', label: 'New password'
= f.password_field :password_confirmation, autocomplete: 'off', label: 'Confirm new password'
= f.submit "Change my password"
= f.submit 'Change my password'
= render "devise/shared/links"
= render "shared/links"
= render 'devise/shared/links'
= render 'shared/links'

View file

@ -0,0 +1,15 @@
- provide(:title, generate_title('Forgot your Password?'))
.container
.row
.col-sm-8.offset-sm-2
.card.mt-3
.card-body
%h1 Forgot your password?
= bootstrap_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
= devise_error_messages!
= f.email_field :email, autofocus: true, label: 'Email address'
= f.submit 'Send me password reset instructions', class: 'btn btn-primary mb-3'
= render 'devise/shared/links'
= render 'shared/links'

View file

@ -1,15 +0,0 @@
- provide(:title, generate_title("Forgot your Password?"))
.container
.row
.col-sm-8.offset-sm-2
.card.mt-3
.card-body
%h1 Forgot your password?
= bootstrap_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f|
= devise_error_messages!
= f.email_field :email, autofocus: true, label: "Email address"
= f.submit "Send me password reset instructions", class: "btn btn-primary mb-3"
= render "devise/shared/links"
= render "shared/links"

View file

@ -0,0 +1,4 @@
= render 'settings/account'
- provide(:title, generate_title('Account Settings'))
- parent_layout 'user/settings'

View file

@ -1,4 +0,0 @@
= render "settings/account"
- provide(:title, generate_title("Account Settings"))
- parent_layout "user/settings"

View file

@ -1,4 +1,4 @@
- provide(:title, generate_title("Sign Up"))
- provide(:title, generate_title('Sign Up'))
.container
.row
.col-sm-8.offset-sm-2
@ -11,11 +11,11 @@
= f.text_field :screen_name, autofocus: true, label: t('views.settings.account.username')
= f.email_field :email, autofocus: false, label: t('views.settings.account.email')
= f.password_field :password, autocomplete: "off", label: t('views.settings.account.password')
= f.password_field :password_confirmation, autocomplete: "off", label: t('views.settings.account.password_confirm')
= f.password_field :password, autocomplete: 'off', label: t('views.settings.account.password')
= f.password_field :password_confirmation, autocomplete: 'off', label: t('views.settings.account.password_confirm')
%p= raw t('views.sessions.info', terms: link_to(t('views.general.terms'), terms_path))
= f.submit "Sign up", class: "btn btn-primary mb-3"
= f.submit 'Sign up', class: 'btn btn-primary mb-3'
= render "devise/shared/links"
= render 'devise/shared/links'
= render 'shared/links'

View file

@ -1,4 +1,4 @@
- provide(:title, generate_title("Sign In"))
- provide(:title, generate_title('Sign In'))
.container
.row
.col-sm-4.offset-sm-4
@ -9,12 +9,12 @@
= bootstrap_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
= f.text_field :login, autofocus: true, label: t('views.settings.account.username')
= f.password_field :password, autocomplete: "off", label: t('views.settings.account.password')
= f.password_field :password, autocomplete: 'off', label: t('views.settings.account.password')
- if devise_mapping.rememberable?
= f.check_box :remember_me
= f.submit t('views.sessions.create'), class: "btn btn-primary mt-3 mb-3"
= f.submit t('views.sessions.create'), class: 'btn btn-primary mt-3 mb-3'
= render "devise/shared/links"
= render "shared/links"
= render 'devise/shared/links'
= render 'shared/links'

View file

@ -1,13 +1,13 @@
- if controller_name != 'sessions'
= link_to "Sign in", new_session_path(resource_name)
= link_to 'Sign in', new_session_path(resource_name)
%br/
- if devise_mapping.registerable? && controller_name != 'registrations'
= link_to "Sign up", new_registration_path(resource_name)
= link_to 'Sign up', new_registration_path(resource_name)
%br/
- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations'
= link_to "Forgot your password?", new_password_path(resource_name)
= link_to 'Forgot your password?', new_password_path(resource_name)
%br/
- if devise_mapping.confirmable? && controller_name != 'confirmations'
@ -21,4 +21,4 @@
- if devise_mapping.omniauthable?
- resource_class.omniauth_providers.each do |provider|
= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider)
%br/
%br/

View file

@ -1,4 +1,4 @@
- provide(:title, generate_title("Unlock"))
- provide(:title, generate_title('Unlock'))
.container
%h1 Resend unlock instructions
= render 'layouts/messages'
@ -6,9 +6,9 @@
= bootstrap_form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f|
= devise_error_messages!
= f.email_field :email, autofocus: true, label: "Email address"
= f.email_field :email, autofocus: true, label: 'Email address'
= f.submit "Resend unlock instructions"
= f.submit 'Resend unlock instructions'
= render "devise/shared/links"
= render "shared/links"
= render 'devise/shared/links'
= render 'shared/links'