diff --git a/app/assets/stylesheets/scaffolds.scss b/app/assets/stylesheets/scaffolds.scss index 3508b887..c1f28f5a 100644 --- a/app/assets/stylesheets/scaffolds.scss +++ b/app/assets/stylesheets/scaffolds.scss @@ -5,6 +5,7 @@ body { font-family: 'Roboto', sans-serif; font-size: 13px; line-height: 18px; margin: 33px; + font-size: 15px; } .notice, .alert, .subscription, .highlight { @@ -44,3 +45,9 @@ footer { padding-top: 12px; clear: both; } + +form { + .form-group { + padding-top: 12px; + } +} diff --git a/app/views/devise/confirmations/new.html.haml b/app/views/devise/confirmations/new.html.haml new file mode 100644 index 00000000..0ae8b1e7 --- /dev/null +++ b/app/views/devise/confirmations/new.html.haml @@ -0,0 +1,10 @@ +%h2 Resend confirmation instructions += form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| + = devise_error_messages! + .field + = f.label :email + %br/ + = f.email_field :email, autofocus: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) + .actions + = f.submit "Resend confirmation instructions" += render "devise/shared/links" diff --git a/app/views/devise/mailer/confirmation_instructions.html.haml b/app/views/devise/mailer/confirmation_instructions.html.haml new file mode 100644 index 00000000..27d48e6d --- /dev/null +++ b/app/views/devise/mailer/confirmation_instructions.html.haml @@ -0,0 +1,4 @@ +%p + Welcome #{@email}! +%p You can confirm your account email through the link below: +%p= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) diff --git a/app/views/devise/mailer/password_change.html.haml b/app/views/devise/mailer/password_change.html.haml new file mode 100644 index 00000000..ab7c04c4 --- /dev/null +++ b/app/views/devise/mailer/password_change.html.haml @@ -0,0 +1,3 @@ +%p + Hello #{@resource.email}! +%p We're contacting you to notify you that your password has been changed. diff --git a/app/views/devise/mailer/reset_password_instructions.html.haml b/app/views/devise/mailer/reset_password_instructions.html.haml new file mode 100644 index 00000000..0711cd5a --- /dev/null +++ b/app/views/devise/mailer/reset_password_instructions.html.haml @@ -0,0 +1,6 @@ +%p + Hello #{@resource.email}! +%p Someone has requested a link to change your password. You can do this through the link below. +%p= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) +%p If you didn't request this, please ignore this email. +%p 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.html.haml b/app/views/devise/mailer/unlock_instructions.html.haml new file mode 100644 index 00000000..282c98a2 --- /dev/null +++ b/app/views/devise/mailer/unlock_instructions.html.haml @@ -0,0 +1,5 @@ +%p + Hello #{@resource.email}! +%p Your account has been locked due to an excessive number of unsuccessful sign in attempts. +%p Click the link below to unlock your account: +%p= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) diff --git a/app/views/devise/passwords/edit.html.haml b/app/views/devise/passwords/edit.html.haml new file mode 100644 index 00000000..fc6f52d8 --- /dev/null +++ b/app/views/devise/passwords/edit.html.haml @@ -0,0 +1,19 @@ +%h2 Change your password += form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| + = devise_error_messages! + = f.hidden_field :reset_password_token + .field + = f.label :password, "New password" + %br/ + - if @minimum_password_length + %em + (#{@minimum_password_length} characters minimum) + %br/ + = f.password_field :password, autofocus: true, autocomplete: "off" + .field + = f.label :password_confirmation, "Confirm new password" + %br/ + = f.password_field :password_confirmation, autocomplete: "off" + .actions + = f.submit "Change my password" += render "devise/shared/links" diff --git a/app/views/devise/passwords/new.html.haml b/app/views/devise/passwords/new.html.haml new file mode 100644 index 00000000..9add188d --- /dev/null +++ b/app/views/devise/passwords/new.html.haml @@ -0,0 +1,10 @@ +%h2 Forgot your password? += form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| + = devise_error_messages! + .field + = f.label :email + %br/ + = f.email_field :email, autofocus: true + .actions + = f.submit "Send me reset password instructions" += render "devise/shared/links" diff --git a/app/views/devise/registrations/edit.html.haml b/app/views/devise/registrations/edit.html.haml new file mode 100644 index 00000000..09789dee --- /dev/null +++ b/app/views/devise/registrations/edit.html.haml @@ -0,0 +1,36 @@ +%h2 + Edit #{resource_name.to_s.humanize} += form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| + = devise_error_messages! + .field + = f.label :email + %br/ + = f.email_field :email, autofocus: true + - if devise_mapping.confirmable? && resource.pending_reconfirmation? + %div + Currently waiting confirmation for: #{resource.unconfirmed_email} + .field + = f.label :password + %i (leave blank if you don't want to change it) + %br/ + = f.password_field :password, autocomplete: "off" + - if @minimum_password_length + %br/ + %em + = @minimum_password_length + characters minimum + .field + = f.label :password_confirmation + %br/ + = f.password_field :password_confirmation, autocomplete: "off" + .field + = f.label :current_password + %i (we need your current password to confirm your changes) + %br/ + = f.password_field :current_password, autocomplete: "off" + .actions + = f.submit "Update" +%h3 Cancel my account +%p + Unhappy? #{button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete} += link_to "Back", :back diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml new file mode 100644 index 00000000..020c1ce6 --- /dev/null +++ b/app/views/devise/registrations/new.html.haml @@ -0,0 +1,28 @@ +.row + .offset-sm-2.col-sm-8 + %h3 Register A New Account + = form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| + = devise_error_messages! + + .form-group + = f.label :email + %br/ + = f.email_field :email, autofocus: true, class: 'form-control' + + .form-group + = f.label :password + - if @minimum_password_length + %em + (#{@minimum_password_length} characters minimum) + %br/ + = f.password_field :password, autocomplete: "off", class: 'form-control' + + .form-group + = f.label :password_confirmation + %br/ + = f.password_field :password_confirmation, autocomplete: "off", class: 'form-control' + + .form-group + = f.submit "Sign Up", class: 'btn btn-primary' + + = render "devise/shared/links" diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml new file mode 100644 index 00000000..d373ac30 --- /dev/null +++ b/app/views/devise/sessions/new.html.haml @@ -0,0 +1,30 @@ +.row + .offset-sm-2.col-sm-8 + %h3 Log In To Your Account + = form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| + = devise_error_messages! + + .form-group + = f.label :email + %br/ + = f.email_field :email, autofocus: true, class: 'form-control' + + .form-group + = f.label :password + - if @minimum_password_length + %em + (#{@minimum_password_length} characters minimum) + %br/ + = f.password_field :password, autocomplete: "off", class: 'form-control' + + - if devise_mapping.rememberable? + .form-group + .form-check + .form-check-label + = f.check_box :remember_me, class: 'form-check-input' + = f.label :remember_me + + .form-group + = f.submit "Log In", class: 'btn btn-primary' + + = render "devise/shared/links" diff --git a/app/views/devise/shared/_links.html.haml b/app/views/devise/shared/_links.html.haml new file mode 100644 index 00000000..39ed8639 --- /dev/null +++ b/app/views/devise/shared/_links.html.haml @@ -0,0 +1,49 @@ +  +  +  +  + +- if controller_name != 'sessions' + Already have an account? + = link_to "Log In", new_session_path(resource_name) +   +   +   +   + +- if devise_mapping.registerable? && controller_name != 'registrations' + Don't have an account? + = link_to "Sign Up", new_registration_path(resource_name) +   +   +   +   + +- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' + = link_to "Forgot your password?", new_password_path(resource_name) +   +   +   +   + +- if devise_mapping.confirmable? && controller_name != 'confirmations' + = link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) +   +   +   +   + +- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' + = link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) +   +   +   +   + +- if devise_mapping.omniauthable? + - resource_class.omniauth_providers.each do |provider| + = link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider) +   +   +   +   diff --git a/app/views/devise/unlocks/new.html.haml b/app/views/devise/unlocks/new.html.haml new file mode 100644 index 00000000..8df87885 --- /dev/null +++ b/app/views/devise/unlocks/new.html.haml @@ -0,0 +1,10 @@ +%h2 Resend unlock instructions += form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| + = devise_error_messages! + .field + = f.label :email + %br/ + = f.email_field :email, autofocus: true + .actions + = f.submit "Resend unlock instructions" += render "devise/shared/links"