generated from nimblehq/git-template
-
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.
[Task-11][Frontend] As a user, I can change password in the settings
Merge pull request #31 from rafayet-monon/feature/task-11-frontend-settings
- Loading branch information
Showing
6 changed files
with
87 additions
and
25 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
50 changes: 29 additions & 21 deletions
50
lib/elixir_search_extractor_web/templates/user_settings/edit.html.eex
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,29 +1,37 @@ | ||
<h1>Settings</h1> | ||
<div class="card-auth"> | ||
<div class="card-auth__form"> | ||
<div class="card-auth__title"> | ||
<h4><%= dgettext("auth", "Change password!") %></h4> | ||
</div> | ||
|
||
<h3>Change password</h3> | ||
<%= form_for @password_changeset, Routes.user_settings_path(@conn, :update), [class: "form form--horizontal"], fn f -> %> | ||
|
||
<%= form_for @password_changeset, Routes.user_settings_path(@conn, :update), fn f -> %> | ||
<%= if @password_changeset.action do %> | ||
<div class="alert alert-danger"> | ||
<p>Oops, something went wrong! Please check the errors below.</p> | ||
</div> | ||
<% end %> | ||
<%= hidden_input f, :action, name: "action", value: "update_password" %> | ||
|
||
<%= hidden_input f, :action, name: "action", value: "update_password" %> | ||
<div class="form__group required"> | ||
<%= label f, :password, dgettext("auth", "New password") %> | ||
<%= password_input f, :password, required: true, class: "form__control" %> | ||
<%= error_tag f, :password %> | ||
</div> | ||
|
||
<%= label f, :password, "New password" %> | ||
<%= password_input f, :password, required: true %> | ||
<%= error_tag f, :password %> | ||
<div class="form__group required"> | ||
<%= label f, :password_confirmation, dgettext("auth", "Confirm password") %> | ||
<%= password_input f, :password_confirmation, required: true, class: "form__control" %> | ||
<%= error_tag f, :password_confirmation %> | ||
</div> | ||
|
||
<%= label f, :password_confirmation, "Confirm new password" %> | ||
<%= password_input f, :password_confirmation, required: true %> | ||
<%= error_tag f, :password_confirmation %> | ||
<div class="form__group required"> | ||
<%= label f, :current_password, dgettext("auth", "Current password"), for: "current_password_for_password" %> | ||
<%= password_input f, :current_password, required: true, name: "current_password", | ||
id: "current_password_for_password", class: "form__control" %> | ||
<%= error_tag f, :current_password %> | ||
</div> | ||
|
||
<%= label f, :current_password, for: "current_password_for_password" %> | ||
<%= password_input f, :current_password, required: true, name: "current_password", id: "current_password_for_password" %> | ||
<%= error_tag f, :current_password %> | ||
<%= submit dgettext("auth", "Change password"), class: "btn btn--primary card-auth__button" %> | ||
<% end %> | ||
|
||
<div> | ||
<%= submit "Change password" %> | ||
<div class="card-auth__footer"> | ||
<%= dgettext("auth", "Go back to") %> <%= link "Dashboard!", to: Routes.page_path(@conn, :index) %> | ||
</div> | ||
</div> | ||
<% end %> | ||
</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
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
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