From 5b7eb4b56271bab0c2861efe68373856785e0047 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Sat, 15 Aug 2015 02:47:57 +0300 Subject: [PATCH] Remove global Devise views --- app/views/devise/confirmations/new.html.slim | 15 --------- .../mailer/confirmation_instructions.text.erb | 5 --- .../reset_password_instructions.text.erb | 8 ----- .../mailer/unlock_instructions.text.erb | 7 ----- app/views/devise/passwords/edit.html.slim | 18 ----------- app/views/devise/passwords/new.html.slim | 14 --------- app/views/devise/registrations/edit.html.slim | 31 ------------------- app/views/devise/registrations/new.html.slim | 16 ---------- app/views/devise/sessions/new.html.slim | 17 ---------- app/views/devise/shared/_links.html.slim | 16 ---------- app/views/devise/unlocks/new.html.slim | 15 --------- 11 files changed, 162 deletions(-) delete mode 100644 app/views/devise/confirmations/new.html.slim delete mode 100644 app/views/devise/mailer/confirmation_instructions.text.erb delete mode 100644 app/views/devise/mailer/reset_password_instructions.text.erb delete mode 100644 app/views/devise/mailer/unlock_instructions.text.erb delete mode 100644 app/views/devise/passwords/edit.html.slim delete mode 100644 app/views/devise/passwords/new.html.slim delete mode 100644 app/views/devise/registrations/edit.html.slim delete mode 100644 app/views/devise/registrations/new.html.slim delete mode 100644 app/views/devise/sessions/new.html.slim delete mode 100644 app/views/devise/shared/_links.html.slim delete mode 100644 app/views/devise/unlocks/new.html.slim diff --git a/app/views/devise/confirmations/new.html.slim b/app/views/devise/confirmations/new.html.slim deleted file mode 100644 index 72c8dca..0000000 --- a/app/views/devise/confirmations/new.html.slim +++ /dev/null @@ -1,15 +0,0 @@ -- content_for(:title) { ":: #{t :resend_instructions_header}" } - -h2.entry-title = t :resend_instructions_header - -= simple_form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| - = f.error_notification - = f.full_error :confirmation_token - - .form-inputs - = f.input :email, required: true, autofocus: true, hint: false - - .form-actions - = f.button :submit, t(:resend_instructions_btn) - -== render 'devise/shared/links' diff --git a/app/views/devise/mailer/confirmation_instructions.text.erb b/app/views/devise/mailer/confirmation_instructions.text.erb deleted file mode 100644 index b80b172..0000000 --- a/app/views/devise/mailer/confirmation_instructions.text.erb +++ /dev/null @@ -1,5 +0,0 @@ -<%= t(:welcome, name: @email) %>! - -<%= t(:confirm_by_clicking) %> - -<%= confirmation_url(@resource, confirmation_token: @token) %> diff --git a/app/views/devise/mailer/reset_password_instructions.text.erb b/app/views/devise/mailer/reset_password_instructions.text.erb deleted file mode 100644 index f0089f8..0000000 --- a/app/views/devise/mailer/reset_password_instructions.text.erb +++ /dev/null @@ -1,8 +0,0 @@ -<%= t(:hello, name: @resource.email) %>! - -<%= t(:someone_requested_passreset) %> - -<%= edit_password_url(@resource, reset_password_token: @token) %> - -<%= t(:do_not_want_pass_reset1) %> -<%= t(:do_not_want_pass_reset2) %> diff --git a/app/views/devise/mailer/unlock_instructions.text.erb b/app/views/devise/mailer/unlock_instructions.text.erb deleted file mode 100644 index 4d2a69b..0000000 --- a/app/views/devise/mailer/unlock_instructions.text.erb +++ /dev/null @@ -1,7 +0,0 @@ -<%= t(:hello, name: @resource.email) %>! - -<%= t(:account_locked) %> - -<%= t(:click_to_unlock) %> - -<%= unlock_url(@resource, unlock_token: @token) %> diff --git a/app/views/devise/passwords/edit.html.slim b/app/views/devise/passwords/edit.html.slim deleted file mode 100644 index f39bcb7..0000000 --- a/app/views/devise/passwords/edit.html.slim +++ /dev/null @@ -1,18 +0,0 @@ -- content_for(:title) { ":: #{t :change_pass}" } - -h2.entry-title = t :change_pass - -= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| - = f.error_notification - - = f.input :reset_password_token, as: :hidden - = f.full_error :reset_password_token - - .form-inputs - = f.input :password, required: true, autofocus: true - = f.input :password_confirmation, required: true - - .form-actions - = f.button :submit, t(:change_pass) - -= render 'devise/shared/links' diff --git a/app/views/devise/passwords/new.html.slim b/app/views/devise/passwords/new.html.slim deleted file mode 100644 index 7e1f90c..0000000 --- a/app/views/devise/passwords/new.html.slim +++ /dev/null @@ -1,14 +0,0 @@ -- content_for(:title) { ":: #{t :lostpass}" } - -h2.entry-title = t :lostpass - -= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| - = f.error_notification - - .form-inputs - = f.input :email, required: true, autofocus: true, hint: false - - .form-actions - = f.button :submit, t(:send_lostpass_instructions) - -== render 'devise/shared/links' diff --git a/app/views/devise/registrations/edit.html.slim b/app/views/devise/registrations/edit.html.slim deleted file mode 100644 index 3f87f5c..0000000 --- a/app/views/devise/registrations/edit.html.slim +++ /dev/null @@ -1,31 +0,0 @@ -- content_for(:title) { ":: #{t :edit_personal_profile}" } - -= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put, multipart: true }) do |f| - .form_inputs - h2.entry-title = t :personal_profile - = f.error_notification - = f.simple_fields_for :personal_profile do |ff| - = ff.input :picture, as: :image_preview, input_html: {preview_version: :thumb}, required: true - = ff.input :first_name, autofocus: true - = ff.input :last_name - = ff.input :public_email - = ff.input :organisation - = ff.input :github - = ff.input :twitter - = ff.input :mobile_phone, input_html: {value: resource.personal_profile.mobile_phone.try(:phony_formatted, format: :international)} - = ff.input :biography - - .form-inputs - h3.entry-title = t :login_data - = f.input :email, required: true - - - if devise_mapping.confirmable? && resource.pending_reconfirmation? - p - = t :expected_validation, email: resource.unconfirmed_email - - = f.input :password, autocomplete: "off", hint: t(:pass_update_hint1), required: false - = f.input :password_confirmation, required: false - = f.input :current_password, hint: t(:pass_update_hint2), required: true - - .form-actions - = f.button :submit, t(:update) diff --git a/app/views/devise/registrations/new.html.slim b/app/views/devise/registrations/new.html.slim deleted file mode 100644 index 0d23186..0000000 --- a/app/views/devise/registrations/new.html.slim +++ /dev/null @@ -1,16 +0,0 @@ -- content_for(:title) { ":: #{t 'registrations.sign_up'}" } - -h2.entry-title = t 'registrations.sign_up' - -= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| - = f.error_notification - - .form-inputs - = f.input :email, required: true, autofocus: true - = f.input :password, required: true - = f.input :password_confirmation, required: true - - .form-actions - = f.button :submit - -== render 'devise/shared/links' diff --git a/app/views/devise/sessions/new.html.slim b/app/views/devise/sessions/new.html.slim deleted file mode 100644 index 26638b5..0000000 --- a/app/views/devise/sessions/new.html.slim +++ /dev/null @@ -1,17 +0,0 @@ -- content_for(:title) { t 'sessions.sign_in' } - -.row - .centered_form - = simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| - header - legend - h2.entry-title = t 'sessions.sign_in_heading' - .form-inputs - = f.input :email, required: false, autofocus: true, hint: false - = f.input :password, required: false, hint: false - = f.input :remember_me, as: :boolean if devise_mapping.rememberable? - - .form-actions - = f.button :submit, t('sessions.sign_in') - - = render 'devise/shared/links' diff --git a/app/views/devise/shared/_links.html.slim b/app/views/devise/shared/_links.html.slim deleted file mode 100644 index 58e0871..0000000 --- a/app/views/devise/shared/_links.html.slim +++ /dev/null @@ -1,16 +0,0 @@ -br -- if controller_name != 'sessions' - = link_to t('sessions.sign_in'), new_user_session_path - br - -- if devise_mapping.registerable? && controller_name != 'registrations' - = link_to t('registrations.sign_up'), new_user_registration_path - br - -- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' - = link_to t('passwords.forgotten_password'), new_user_password_path - br - -- if devise_mapping.confirmable? && controller_name != 'confirmations' - = link_to t('confirmations.did_not_receive_confirmation_instructions'), new_user_confirmation_path - br diff --git a/app/views/devise/unlocks/new.html.slim b/app/views/devise/unlocks/new.html.slim deleted file mode 100644 index 0f91453..0000000 --- a/app/views/devise/unlocks/new.html.slim +++ /dev/null @@ -1,15 +0,0 @@ -- content_for(:title) { ":: #{t :resend_unlock_instructions_title}" } - -h2 =t :resend_unlock_instructions_title - -= simple_form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| - = f.error_notification - = f.full_error :unlock_token - - .form-inputs - = f.input :email, required: true, autofocus: true, hint: false - - .form-actions - = f.button :submit, t(:resend_instructions_btn) - -== render 'devise/shared/links'