diff --git a/app/javascript/stylesheets/general/_form.scss b/app/javascript/stylesheets/general/_form.scss
index 363728fc..2abed6fc 100644
--- a/app/javascript/stylesheets/general/_form.scss
+++ b/app/javascript/stylesheets/general/_form.scss
@@ -11,4 +11,27 @@
.form-control:focus {
border-color: $astuto-grey;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 4px rgba(0, 0, 0, 0.6);
+}
+
+.new_user, .edit_user {
+ @extend .card;
+
+ width: 100%;
+ max-width: 360px;
+
+ text-align: center;
+
+ padding: 15px;
+ margin: 0 auto;
+}
+
+.deviseLinks {
+ @extend .new_user;
+
+ display: flex;
+ flex-direction: column;
+
+ margin-top: 24px;
+
+ a { color: #333; }
}
\ No newline at end of file
diff --git a/app/views/devise/confirmations/new.html.erb b/app/views/devise/confirmations/new.html.erb
index bc619e15..0a209990 100644
--- a/app/views/devise/confirmations/new.html.erb
+++ b/app/views/devise/confirmations/new.html.erb
@@ -1,15 +1,15 @@
-
Resend confirmation instructions
-
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
+ Resend confirmation instructions
+
<%= render "devise/shared/error_messages", resource: resource %>
- <%= f.label :email %>
- <%= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email), class: "form-control" %>
+ <%= f.label :email, class: "sr-only" %>
+ <%= f.email_field :email, autofocus: true, autocomplete: "email", placeholder: "Email address", required: true, value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email), class: "form-control" %>
- <%= f.submit "Resend confirmation instructions", class: "btn btn-primary" %>
+ <%= f.submit "Resend confirmation instructions", class: "btn btn-dark btn-block" %>
<% end %>
diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb
index ce3e7ad3..2b8e8ba6 100644
--- a/app/views/devise/passwords/new.html.erb
+++ b/app/views/devise/passwords/new.html.erb
@@ -1,15 +1,15 @@
-Forgot your password?
-
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
+ Forgot your password?
+
<%= render "devise/shared/error_messages", resource: resource %>
- <%= f.label :email %>
- <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "form-control" %>
+ <%= f.label :email, class: "sr-only" %>
+ <%= f.email_field :email, autofocus: true, autocomplete: "email", placeholder: "Email address", required: true, class: "form-control" %>
- <%= f.submit "Send me reset password instructions", class: "btn btn-primary" %>
+ <%= f.submit "Send me reset password instructions", class: "btn btn-dark btn-block" %>
<% end %>
diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb
index 1d1ce81b..10e9562e 100644
--- a/app/views/devise/registrations/edit.html.erb
+++ b/app/views/devise/registrations/edit.html.erb
@@ -1,6 +1,6 @@
-Profile settings
-
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
+ Profile settings
+
<%= render "devise/shared/error_messages", resource: resource %>
@@ -47,12 +47,15 @@
- <%= f.submit "Update profile", class: "btn btn-primary" %>
+ <%= f.submit "Update profile", class: "btn btn-dark btn-block" %>
<% end %>
-Cancel my account
-
-Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete, class: "btn btn-danger" %>
+
+
Cancel my account
+
Unhappy?
+ <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete, class: "btn btn-danger btn-block" %>
+
+
diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb
index 4731fcc9..ba099dd7 100644
--- a/app/views/devise/registrations/new.html.erb
+++ b/app/views/devise/registrations/new.html.erb
@@ -1,36 +1,31 @@
-Sign up
-
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
+ Sign up
+
<%= render "devise/shared/error_messages", resource: resource %>
- <%= f.label :full_name %>
- <%= f.text_field :full_name, autofocus: true, autocomplete: "full-name", class: "form-control" %>
+ <%= f.label :full_name, class: "sr-only" %>
+ <%= f.text_field :full_name, autofocus: true, placeholder: "Full name", required: true, class: "form-control" %>
- <%= f.label :email %>
- <%= f.email_field :email, autocomplete: "email", class: "form-control" %>
+ <%= f.label :email, class: "sr-only" %>
+ <%= f.email_field :email, autocomplete: "email", placeholder: "Email address", required: true, class: "form-control" %>
- <%= f.label :password %>
- <%= f.password_field :password, autocomplete: "new-password", class: "form-control" %>
- <% if @minimum_password_length %>
-
- <%= @minimum_password_length %> characters minimum
-
- <% end %>
+ <%= f.label :password, class: "sr-only" %>
+ <%= f.password_field :password, placeholder: "Password", required: true, class: "form-control" %>
- <%= f.label :password_confirmation %>
- <%= f.password_field :password_confirmation, autocomplete: "new-password", class: "form-control" %>
+ <%= f.label :password_confirmation, class: "sr-only" %>
+ <%= f.password_field :password_confirmation, placeholder: "Password confirmation", required: true, class: "form-control" %>
- <%= f.submit "Sign up", class: "btn btn-primary" %>
+ <%= f.submit "Sign up", class: "btn btn-dark btn-block" %>
<% end %>
-<%= render "devise/shared/links" %>
+<%= render "devise/shared/links" %>
\ No newline at end of file
diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb
index 12f0f281..4362bf40 100644
--- a/app/views/devise/sessions/new.html.erb
+++ b/app/views/devise/sessions/new.html.erb
@@ -1,14 +1,14 @@
-Log in
-
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
+ Log in
+
- <%= f.label :email %>
- <%= f.email_field :email, autofocus: true, autocomplete: "email", class: "form-control" %>
+ <%= f.label :email, class: "sr-only" %>
+ <%= f.email_field :email, autofocus: true, autocomplete: "email", placeholder: "Email address", required: true, class: "form-control" %>
- <%= f.label :password %>
- <%= f.password_field :password, autocomplete: "current-password", class: "form-control" %>
+ <%= f.label :password, class: "sr-only" %>
+ <%= f.password_field :password, autocomplete: "current-password", placeholder: "Password", required: true, class: "form-control" %>
<% if devise_mapping.rememberable? %>
@@ -19,8 +19,8 @@
<% end %>
- <%= f.submit "Log in", class: "btn btn-primary" %>
+ <%= f.submit "Log in", class: "btn btn-dark btn-block" %>
<% end %>
-<%= render "devise/shared/links" %>
+<%= render "devise/shared/links" %>
\ No newline at end of file
diff --git a/app/views/devise/shared/_error_messages.html.erb b/app/views/devise/shared/_error_messages.html.erb
index f1bbd9bd..cb982249 100644
--- a/app/views/devise/shared/_error_messages.html.erb
+++ b/app/views/devise/shared/_error_messages.html.erb
@@ -1,15 +1,7 @@
<% if resource.errors.any? %>
-
-
- <%= I18n.t("errors.messages.not_saved",
- count: resource.errors.count,
- resource: resource.class.model_name.human.downcase)
- %>
-
-
- <% resource.errors.full_messages.each do |message| %>
- - <%= message %>
- <% end %>
-
+
+ <% resource.errors.full_messages.each do |message| %>
+ <%= message %>
+ <% end %>
<% end %>
diff --git a/app/views/devise/shared/_links.html.erb b/app/views/devise/shared/_links.html.erb
index 084af701..61f3d15a 100644
--- a/app/views/devise/shared/_links.html.erb
+++ b/app/views/devise/shared/_links.html.erb
@@ -1,25 +1,27 @@
+
<%- if controller_name != 'sessions' %>
- <%= link_to "Log in", new_session_path(resource_name) %>
+ <%= link_to "Log in", new_session_path(resource_name) %>
<% end %>
<%- 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) %>
<% end %>
<%- 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) %>
<% end %>
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
- <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %>
+ <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %>
<% end %>
<%- 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) %>
+ <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %>
<% end %>
<%- 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) %>
+ <%= link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider) %>
<% end %>
<% end %>
+
\ No newline at end of file