-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
95 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,63 @@ | ||
<h2>Edit <%= resource_name.to_s.humanize %></h2> | ||
|
||
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %> | ||
<div class="ui container"> | ||
<%= 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> | ||
<h3 class="ui top attached header"> | ||
<i class="settings icon"></i> | ||
<div class="content"> | ||
Account Settings | ||
<div class="sub header">Manage your preferences</div> | ||
</div> | ||
</h3> | ||
<div class="ui attached segment"> | ||
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put, class: 'ui form'}) do |f| %> | ||
|
||
<div class="field"> | ||
<%= f.label :full_name %> | ||
<%= f.text_field :name, autocomplete: "name" %> | ||
</div> | ||
|
||
<div class="field"> | ||
<%= f.label :email %> | ||
<%= f.email_field :email, autocomplete: "email" %> | ||
</div> | ||
|
||
<div class="field"> | ||
<%= f.label :title %> | ||
<%= f.text_field :title, autocomplete: "name" %> | ||
</div> | ||
|
||
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> | ||
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div> | ||
<% end %> | ||
|
||
<div class="field"> | ||
<%= f.label :password %> | ||
<%= f.password_field :password, autocomplete: "new-password" %> | ||
</div> | ||
|
||
<div class="field"> | ||
<%= f.label :password_confirmation %> | ||
<%= f.password_field :password_confirmation, autocomplete: "new-password" %> | ||
</div> | ||
|
||
<div class="field"> | ||
<%= f.label :current_password %> | ||
<%= f.password_field :current_password, autocomplete: "current-password" %> | ||
</div> | ||
|
||
<div class="actions"> | ||
<%= f.button "Save", class: 'blue ui button' %> | ||
<%= link_to "Cancel", current_user, class: 'ui button'%> | ||
</div> | ||
<% end %> | ||
|
||
<h3>Delete my account</h3> | ||
|
||
<p>Unhappy? </p> <br /> | ||
<%= link_to "Delete my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete, class: 'negative ui button' %> | ||
<br /> | ||
</div> | ||
</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> | ||
<!-- <%= link_to "Back", :back %> --> | ||
|
||
<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p> | ||
|
||
<%= link_to "Back", :back %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,26 @@ | ||
<h1 align="center"><%= @user.name %></h1> | ||
<h4 align="center"><%= @user.title %></h4> | ||
<h4 align="center"><%= @user.email %></h4> | ||
<div class="ui container"> | ||
<div class="ui card"> | ||
<div class="content"> | ||
<div class="header"> | ||
<%= @user.name %> | ||
</div> | ||
</div> | ||
<div class="content"> | ||
<h4 class="ui sub header"> | ||
<%= @user.title %> | ||
</h4> | ||
<div class="ui small feed"> | ||
<div class="event"> | ||
<div class="content"> | ||
<div class="summary"> | ||
<%= @user.email %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="extra content"> | ||
<%= link_to 'Edit', edit_user_registration_path, class: 'ui button' %> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters