diff --git a/app/views/devise/confirmations/new.html.haml b/app/views/devise/confirmations/new.haml similarity index 60% rename from app/views/devise/confirmations/new.html.haml rename to app/views/devise/confirmations/new.haml index da395950..ba3a40fa 100644 --- a/app/views/devise/confirmations/new.html.haml +++ b/app/views/devise/confirmations/new.haml @@ -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' diff --git a/app/views/devise/mailer/confirmation_instructions.haml b/app/views/devise/mailer/confirmation_instructions.haml new file mode 100644 index 00000000..466209dc --- /dev/null +++ b/app/views/devise/mailer/confirmation_instructions.haml @@ -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)) diff --git a/app/views/devise/mailer/confirmation_instructions.html.haml b/app/views/devise/mailer/confirmation_instructions.html.haml deleted file mode 100644 index ae56f4eb..00000000 --- a/app/views/devise/mailer/confirmation_instructions.html.haml +++ /dev/null @@ -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)) diff --git a/app/views/devise/mailer/reset_password_instructions.haml b/app/views/devise/mailer/reset_password_instructions.haml new file mode 100644 index 00000000..b6b23a0f --- /dev/null +++ b/app/views/devise/mailer/reset_password_instructions.haml @@ -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. diff --git a/app/views/devise/mailer/reset_password_instructions.html.haml b/app/views/devise/mailer/reset_password_instructions.html.haml deleted file mode 100644 index 00c50a44..00000000 --- a/app/views/devise/mailer/reset_password_instructions.html.haml +++ /dev/null @@ -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. diff --git a/app/views/devise/mailer/unlock_instructions.haml b/app/views/devise/mailer/unlock_instructions.haml new file mode 100644 index 00000000..45541a3e --- /dev/null +++ b/app/views/devise/mailer/unlock_instructions.haml @@ -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)) diff --git a/app/views/devise/mailer/unlock_instructions.html.haml b/app/views/devise/mailer/unlock_instructions.html.haml deleted file mode 100644 index eb427845..00000000 --- a/app/views/devise/mailer/unlock_instructions.html.haml +++ /dev/null @@ -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)) diff --git a/app/views/devise/passwords/edit.html.haml b/app/views/devise/passwords/edit.haml similarity index 65% rename from app/views/devise/passwords/edit.html.haml rename to app/views/devise/passwords/edit.haml index 7c052384..07bf9426 100644 --- a/app/views/devise/passwords/edit.html.haml +++ b/app/views/devise/passwords/edit.haml @@ -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' diff --git a/app/views/devise/passwords/new.haml b/app/views/devise/passwords/new.haml new file mode 100644 index 00000000..16d44834 --- /dev/null +++ b/app/views/devise/passwords/new.haml @@ -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' diff --git a/app/views/devise/passwords/new.html.haml b/app/views/devise/passwords/new.html.haml deleted file mode 100644 index b3578cfe..00000000 --- a/app/views/devise/passwords/new.html.haml +++ /dev/null @@ -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" diff --git a/app/views/devise/registrations/edit.haml b/app/views/devise/registrations/edit.haml new file mode 100644 index 00000000..2435e936 --- /dev/null +++ b/app/views/devise/registrations/edit.haml @@ -0,0 +1,4 @@ += render 'settings/account' + +- provide(:title, generate_title('Account Settings')) +- parent_layout 'user/settings' diff --git a/app/views/devise/registrations/edit.html.haml b/app/views/devise/registrations/edit.html.haml deleted file mode 100644 index 77d692f8..00000000 --- a/app/views/devise/registrations/edit.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -= render "settings/account" - -- provide(:title, generate_title("Account Settings")) -- parent_layout "user/settings" diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.haml similarity index 71% rename from app/views/devise/registrations/new.html.haml rename to app/views/devise/registrations/new.haml index 7ed1f434..5fe63ce9 100644 --- a/app/views/devise/registrations/new.html.haml +++ b/app/views/devise/registrations/new.haml @@ -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' diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.haml similarity index 65% rename from app/views/devise/sessions/new.html.haml rename to app/views/devise/sessions/new.haml index c6d12ce8..d4dab089 100644 --- a/app/views/devise/sessions/new.html.haml +++ b/app/views/devise/sessions/new.haml @@ -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' diff --git a/app/views/devise/shared/_links.html.haml b/app/views/devise/shared/_links.haml similarity index 81% rename from app/views/devise/shared/_links.html.haml rename to app/views/devise/shared/_links.haml index d4cafbf5..18ff87cc 100644 --- a/app/views/devise/shared/_links.html.haml +++ b/app/views/devise/shared/_links.haml @@ -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/ \ No newline at end of file + %br/ diff --git a/app/views/devise/unlocks/new.html.haml b/app/views/devise/unlocks/new.haml similarity index 51% rename from app/views/devise/unlocks/new.html.haml rename to app/views/devise/unlocks/new.haml index f35c61e4..a099864e 100644 --- a/app/views/devise/unlocks/new.html.haml +++ b/app/views/devise/unlocks/new.haml @@ -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'