diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..b82e3365a3a2f8525d013ed424d4092c42901cec --- /dev/null +++ b/app/views/devise/registrations/edit.html.erb @@ -0,0 +1,43 @@ +<h2>Edit <%= resource_name.to_s.humanize %></h2> + +<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> + <%= render "devise/shared/error_messages", resource: resource %> + + <div class="field"> + <%= f.label :email %><br /> + <%= f.email_field :email, autofocus: true, autocomplete: "email" %> + </div> + + <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> + <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div> + <% end %> + + <div class="field"> + <%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br /> + <%= f.password_field :password, autocomplete: "new-password" %> + <% if @minimum_password_length %> + <br /> + <em><%= @minimum_password_length %> characters minimum</em> + <% end %> + </div> + + <div class="field"> + <%= f.label :password_confirmation %><br /> + <%= f.password_field :password_confirmation, autocomplete: "new-password" %> + </div> + + <div class="field"> + <%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br /> + <%= f.password_field :current_password, autocomplete: "current-password" %> + </div> + + <div class="actions"> + <%= f.submit "Update" %> + </div> +<% end %> + +<h3>Cancel my account</h3> + +<div>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?", turbo_confirm: "Are you sure?" }, method: :delete %></div> + +<%= link_to "Back", :back %> diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..d655b66f6f54f08e4d8d30402226886795067460 --- /dev/null +++ b/app/views/devise/registrations/new.html.erb @@ -0,0 +1,29 @@ +<h2>Sign up</h2> + +<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %> + <%= render "devise/shared/error_messages", resource: resource %> + + <div class="field"> + <%= f.label :email %><br /> + <%= f.email_field :email, autofocus: true, autocomplete: "email" %> + </div> + + <div class="field"> + <%= f.label :password %> + <% if @minimum_password_length %> + <em>(<%= @minimum_password_length %> characters minimum)</em> + <% end %><br /> + <%= f.password_field :password, autocomplete: "new-password" %> + </div> + + <div class="field"> + <%= f.label :password_confirmation %><br /> + <%= f.password_field :password_confirmation, autocomplete: "new-password" %> + </div> + + <div class="actions"> + <%= f.submit "Sign up" %> + </div> +<% end %> + +<%= render "devise/shared/links" %> diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..5ede96489dea7f622fa0302378cdb57518078b1b --- /dev/null +++ b/app/views/devise/sessions/new.html.erb @@ -0,0 +1,26 @@ +<h2>Log in</h2> + +<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> + <div class="field"> + <%= f.label :email %><br /> + <%= f.email_field :email, autofocus: true, autocomplete: "email" %> + </div> + + <div class="field"> + <%= f.label :password %><br /> + <%= f.password_field :password, autocomplete: "current-password" %> + </div> + + <% if devise_mapping.rememberable? %> + <div class="field"> + <%= f.check_box :remember_me %> + <%= f.label :remember_me %> + </div> + <% end %> + + <div class="actions"> + <%= f.submit "Log in" %> + </div> +<% end %> + +<%= render "devise/shared/links" %> diff --git a/app/views/devise/shared/_links.html.erb b/app/views/devise/shared/_links.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..7a75304badb53b2b15261fddc46e4cb9823c367d --- /dev/null +++ b/app/views/devise/shared/_links.html.erb @@ -0,0 +1,25 @@ +<%- if controller_name != 'sessions' %> + <%= link_to "Log in", new_session_path(resource_name) %><br /> +<% end %> + +<%- if devise_mapping.registerable? && controller_name != 'registrations' %> + <%= link_to "Sign up", new_registration_path(resource_name) %><br /> +<% end %> + +<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %> + <%= link_to "Forgot your password?", new_password_path(resource_name) %><br /> +<% end %> + +<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %> + <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br /> +<% 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) %><br /> +<% end %> + +<%- if devise_mapping.omniauthable? %> + <%- resource_class.omniauth_providers.each do |provider| %> + <%= button_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider), data: { turbo: false } %><br /> + <% end %> +<% end %>