Skip to content

Commit

Permalink
fix sign up
Browse files Browse the repository at this point in the history
  • Loading branch information
loftwah committed Sep 6, 2023
1 parent bb7d8bd commit 72a6265
Showing 1 changed file with 4 additions and 23 deletions.
27 changes: 4 additions & 23 deletions app/views/devise/registrations/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,19 @@
<div class="col-md-6">
<div class="card">
<div class="card-header">
<h2>Edit <%= resource_name.to_s.humanize %></h2>
<h2>Sign Up</h2>
</div>
<div class="card-body">
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put, class: 'form-horizontal' }) do |f| %>
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { class: 'form-horizontal' }) do |f| %>
<%= render "devise/shared/error_messages", resource: resource %>

<div class="form-group">
<%= f.label :email, class: 'form-label' %><br />
<%= f.email_field :email, autofocus: true, autocomplete: "email", class: 'form-control' %>
</div>

<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
<div class="alert alert-info">Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
<% end %>

<div class="form-group">
<%= f.label :password, class: 'form-label' %>
<small class="text-muted">(leave blank if you don't want to change it)</small><br />
<%= f.label :password, class: 'form-label' %><br />
<%= f.password_field :password, autocomplete: "new-password", class: 'form-control' %>
<% if @minimum_password_length %>
<small class="text-muted"><%= @minimum_password_length %> characters minimum</small>
Expand All @@ -33,25 +28,11 @@
</div>

<div class="form-group">
<%= f.label :current_password, class: 'form-label' %>
<small class="text-muted">(we need your current password to confirm your changes)</small><br />
<%= f.password_field :current_password, autocomplete: "current-password", class: 'form-control' %>
</div>

<div class="form-group">
<%= f.submit "Update", class: 'btn btn-primary' %>
<%= f.submit "Sign Up", class: 'btn btn-primary' %>
</div>
<% end %>
</div>
</div>
</div>
</div>
</div>

<div class="container mt-3">
<h3>Cancel my account</h3>
<div>
<%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?", turbo_confirm: "Are you sure?" }, method: :delete, class: 'btn btn-danger' %>
</div>
<%= link_to "Back", :back, class: 'btn btn-secondary mt-2' %>
</div>

0 comments on commit 72a6265

Please sign in to comment.