-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reroute to develop [#16] [Frontend] As a User, I can sign up and sign in/out with a username and password #43
Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
04738f3
[#16] Add UI for Sign In view
malparty 108b846
[#16] Add basic navbar for unauthenticated user
malparty 641c641
[#16] Add UI for alert and notice messages
malparty ddbd202
[#16] Fix semantic issue in sign in view
malparty b80de02
[#16] Add UI for Sign Up view
malparty c4a8c1f
[#16] Add nav bar for authenticated users
malparty 8535445
[#16] Add UI to Users/edit view
malparty 658863a
[#16] Add responsiveness to user edit view
malparty 56bc027
[#16] Use translation locales
malparty 9031f6f
[#16] Remove rspec exceptions when asset is missing in test pipeline
malparty b04008b
[#16] Fix tests due to Log In button renamed in Sign In
malparty d3e65d1
[#16] Add My Profile link to navbar
malparty ff1de1b
[#16] Add Footer UI
malparty 9f23814
[#16] Extract header and footer in partial views
malparty 5f52c41
[#16] Update footer to use flex
malparty 942dac8
[#16] Add UI for error messages
malparty a8d3cab
[#16] Add margin top to footer
malparty a23c330
[#16] Update system tests to map error message
malparty c6a337c
[#16] Move footer into layout scss and shared html
malparty f62118b
[#16] Add empty line to logo.svg
malparty 0af3252
[#16] Move edit/new forms into partial views
malparty 94f4675
[#16] Add missing class to html footer
malparty b92a415
root commit
malparty 2afd1e8
[#17] Reduce unused bootstrap modules
malparty 50facc5
[#17] Update default layout scss to follow conventions
malparty fde4798
[#16] Remove .keep and disable some unused bootstrap modules
malparty f8d9119
[#16] Rename _default.scss without _ to match convention
malparty c797e89
[#16] Add empty lines for code clarity
malparty 435fe27
[#16] Remove useless div
malparty 4f9da6e
root commit
malparty 7156ceb
root commit
malparty File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
Empty file.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
// Base | ||
|
||
// Layouts | ||
@import 'layouts/default'; | ||
|
||
// Components | ||
|
||
|
Empty file.
Empty file.
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.layout-default { | ||
.app-footer { | ||
width: 100%; | ||
height: 60px; | ||
margin-top: 2rem; | ||
line-height: 60px; | ||
background-color: $gray-100; | ||
} | ||
} |
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
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 | ||
---|---|---|---|---|
@@ -0,0 +1,70 @@ | ||||
<%= 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="row"> | ||||
<div class="col-12 col-md-6"> | ||||
<div class="form-group"> | ||||
<%= f.label :first_name %><br/> | ||||
<%= f.text_field :first_name, autofocus: true, class: 'form-control' %> | ||||
</div> | ||||
</div> | ||||
<div class="col-12 col-md-6"> | ||||
<div class="form-group"> | ||||
<%= f.label :last_name %><br/> | ||||
<%= f.text_field :last_name, class: 'form-control' %> | ||||
</div> | ||||
</div> | ||||
</div> | ||||
<div class="row"> | ||||
<div class="col-12 col-md-6"> | ||||
<%= f.label :email %> | ||||
<div class="form-group"> | ||||
<%= f.email_field :email, autocomplete: 'email', class: 'form-control' %> | ||||
</div> | ||||
|
||||
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> | ||||
<div><%= t('waiting_confirmation_for') %>: <%= resource.unconfirmed_email %></div> | ||||
<% end %> | ||||
</div> | ||||
<div class="col-12 col-md-6"> | ||||
<div class="form-group"> | ||||
<%= f.label :current_password %> | ||||
<%= f.password_field :current_password, autocomplete: 'current-password', class: 'form-control' %> | ||||
</div> | ||||
</div> | ||||
</div> | ||||
<div class="row"> | ||||
<a class="btn btn-link" | ||||
data-toggle="collapse" | ||||
href="#newPassword" | ||||
role="button" | ||||
aria-expanded="false" | ||||
aria-controls="newPassword"> | ||||
Set a new password | ||||
</a> | ||||
</div> | ||||
<div class="collapse" id="newPassword"> | ||||
<% if @minimum_password_length %> | ||||
<em>(<%= "#{@minimum_password_length} #{t('min_char')}" %>)</em> | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||
<% end %> | ||||
<div class="row"> | ||||
<div class="col-12 col-md-6"> | ||||
<div class="form-group"> | ||||
<%= f.label :password %> <br/> | ||||
<%= f.password_field :password, autocomplete: "new-password", class: 'form-control' %> | ||||
</div> | ||||
</div> | ||||
<div class="col-12 col-md-6"> | ||||
<div class="form-group"> | ||||
<%= f.label :password_confirmation %><br/> | ||||
<%= f.password_field :password_confirmation, autocomplete: 'new-password', class: 'form-control' %> | ||||
</div> | ||||
</div> | ||||
</div> | ||||
</div> | ||||
|
||||
<%= f.submit t('update'), class: 'btn btn-primary btn-block' %> | ||||
|
||||
<% end %> |
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 | ||
---|---|---|---|---|
@@ -0,0 +1,31 @@ | ||||
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %> | ||||
|
||||
<%= render "devise/shared/error_messages", resource: resource %> | ||||
|
||||
<div class="form-group"> | ||||
<%= f.label :first_name %><br/> | ||||
<%= f.text_field :first_name, autofocus: true, class: 'form-control' %> | ||||
</div> | ||||
<div class="form-group"> | ||||
<%= f.label :last_name %><br/> | ||||
<%= f.text_field :last_name, class: 'form-control' %> | ||||
</div> | ||||
<div class="form-group"> | ||||
<%= f.label :email %><br/> | ||||
<%= f.email_field :email, autocomplete: 'email', class: 'form-control' %> | ||||
</div> | ||||
<div class="form-group"> | ||||
<%= f.label :password %><br/> | ||||
<% if @minimum_password_length %> | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||
<em>(<%= "#{@minimum_password_length} #{t('min_char')}" %>)</em> | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||
<% end %><br/> | ||||
<%= f.password_field :password, autocomplete: 'new-password', class: 'form-control' %> | ||||
</div> | ||||
<div class="form-group"> | ||||
<%= f.label :password_confirmation %><br/> | ||||
<%= f.password_field :password_confirmation, autocomplete: 'new-password', class: 'form-control' %> | ||||
</div> | ||||
<div class="form-group"> | ||||
<%= f.submit t('auth.sign_up'), class: 'btn btn-primary btn-block' %> | ||||
</div> | ||||
<% end %> |
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,53 +1,29 @@ | ||
<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 :first_name %><br/> | ||
<%= f.text_field :first_name, autofocus: true %> | ||
<div class="container"> | ||
<div class="row justify-content-center"> | ||
<div class="col col-md-12 col-lg-8"> | ||
<div class="card"> | ||
<section class="card-body"> | ||
<h2>Edit <%= resource_name.to_s.humanize %></h2> | ||
|
||
<%= render 'edit_form' %> | ||
</section> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="field"> | ||
<%= f.label :last_name %><br/> | ||
<%= f.text_field :last_name %> | ||
</div> | ||
|
||
<div class="field"> | ||
<%= f.label :email %><br/> | ||
<%= f.email_field :email, autocomplete: "email" %> | ||
<div class="row justify-content-center mt-2"> | ||
<div class="col col-md-6 col-lg-4"> | ||
<div class="card"> | ||
<section class="card-body"> | ||
<h3>Cancel my account</h3> | ||
|
||
<p><%= t('unhappy') %>? 🥺</p> | ||
<%= button_to t('auth.cancel_my_account'), | ||
registration_path(resource_name), | ||
data: { confirm: t('confirm') }, | ||
method: :delete, | ||
class: 'btn btn-danger btn-block' %> | ||
</section> | ||
</div> | ||
</div> | ||
</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> | ||
|
||
<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p> | ||
|
||
<%= link_to "Back", :back %> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,14 @@ | ||
<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 :first_name %><br/> | ||
<%= f.text_field :first_name, autofocus: true %> | ||
</div> | ||
|
||
<div class="field"> | ||
<%= f.label :last_name %><br/> | ||
<%= f.text_field :last_name %> | ||
</div> | ||
|
||
<div class="field"> | ||
<%= f.label :email %><br/> | ||
<%= f.email_field :email, 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" %> | ||
<div class="container"> | ||
<div class="row justify-content-center"> | ||
<div class="col col-md-6 col-lg-4"> | ||
<div class="card"> | ||
<section class="card-body"> | ||
<%= link_to t('auth.sign_in'), new_session_path(resource_name), class: 'float-right btn btn-outline-primary' %> | ||
<h4 class="card-title mb-4 mt-1">Sign up</h4> | ||
|
||
<%= render 'devise/registrations/new_form' %> | ||
</section> | ||
</div> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,35 @@ | ||
<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 class="container"> | ||
<div class="row justify-content-center"> | ||
<div class="col col-md-6 col-lg-4"> | ||
<div class="card"> | ||
<section class="card-body"> | ||
<%= link_to t('auth.sign_up'), new_registration_path(resource_name), | ||
class: 'float-right btn btn-outline-primary' %> | ||
<h4 class="card-title mb-4 mt-1">Sign in</h4> | ||
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> | ||
<div class="form-group"> | ||
<%= f.label :email %><br /> | ||
<%= f.email_field :email, autofocus: true, autocomplete: 'email', class: 'form-control' %> | ||
</div> | ||
<div class="form-group"> | ||
<%= link_to t('forgot_password'), new_password_path(resource_name), class:'float-right' %><br /> | ||
<%= f.label :password %><br /> | ||
<%= f.password_field :password, autocomplete: 'current-password', class: 'form-control' %> | ||
</div> | ||
<div class="form-group"> | ||
<% if devise_mapping.rememberable? %> | ||
<div class="checkbox"> | ||
<%= f.check_box :remember_me %> | ||
<%= f.label :remember_me %> | ||
</div> | ||
<% end %> | ||
</div> | ||
<div class="form-group"> | ||
<%= f.submit t('auth.sign_in'), class: 'btn btn-primary btn-block' %> | ||
</div> | ||
<% end %> | ||
</section> | ||
</div> | ||
</div> | ||
<% end %> | ||
|
||
<div class="actions"> | ||
<%= f.submit "Log in" %> | ||
</div> | ||
<% end %> | ||
|
||
<%= render "devise/shared/links" %> | ||
</div> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.