app/views/devise/registrations/edit.html.erb in devise-tailwindcssed-0.1.3 vs app/views/devise/registrations/edit.html.erb in devise-tailwindcssed-0.1.4
- old
+ new
@@ -1,60 +1,59 @@
<div class="w-full max-w-xs">
- <h1 class="font-hairline mb-6 text-center">Edit <%= resource_name.to_s.humanize %></h1>
+ <h1 class="font-hairline mb-6 text-center">Edit <%= resource_name.to_s.humanize %></h1>
- <%= form_for(resource,
+ <%= form_for(resource,
as: resource_name,
url: registration_path(resource_name),
html: {
method: :put,
class: "bg-white mb-4 px-8 pt-6 pb-8 rounded shadow-md"
}
) do |f| %>
- <%#= render "devise/shared/error_messages", resource: resource %>
- <%= devise_error_messages! %>
+ <%#= render "devise/shared/error_messages", resource: resource %>
+ <%= devise_error_messages! %>
- <div class="mb-4">
- <%= f.label :email %><br/>
- <%= f.email_field :email,
+ <div class="mb-4">
+ <%= f.label :email, class: "block font-bold mb-2 text-gray-700 text-sm" %><br />
+ <%= f.email_field :email,
autofocus: true,
- autocomplete: "email" %>
- </div>
+ autocomplete: "email",
+ class: "appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none shadow focus:shadow-outline" %>
+ </div>
- <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
- <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
- <% end %>
+ <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
+ <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
+ <% end %>
- <div class="mb-4">
- <%= 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="mb-4">
+ <%= f.label :password, class: "block font-bold mb-2 text-gray-700 text-sm" %> <i>(leave blank if you don't want to change it)</i><br />
+ <%= f.password_field :password, autocomplete: "new-password", class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline" %>
- <div class="mb-4">
- <%= f.label :password_confirmation %><br/>
- <%= f.password_field :password_confirmation,
- autocomplete: "new-password"
+ </div>
+
+ <div class="mb-4">
+ <%= f.label :password_confirmation, class: "block font-bold mb-2 text-gray-700 text-sm" %>
+ <%= f.password_field :password_confirmation,
+ autocomplete: "new-password",
+ class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline"
%>
- </div>
+ </div>
- <div class="mb-4">
- <%= 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 class="mb-4">
+ <%= f.label :current_password, class: "block font-bold mb-2 text-gray-700 text-sm" %>
+ <%= f.password_field :current_password,
+ autocomplete: "current-password",
+ class: "shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline"
+
%>
- </div>
+ </div>
- <div class="actions">
- <%= f.submit "Update" %>
- </div>
- <% end %>
+ <div class="actions">
+ <%= f.submit "Update", class: "button bg-blue-500 hover:bg-blue-700 font-bold text-white focus:outline-none py-2 px-4 rounded focus:shadow-outline w-full" %>
+ </div>
+ <% end %>
- <h1 class="font-hairline mb-6 text-center">Cancel My Account</h1>
+ <p>Unhappy? <span><%= button_to "Delete my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></span></p>
- <p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p>
-
- <%= link_to "Back", :back %>
+ <%= link_to "Back", :back %>
</div>