Skip to content

Commit

Permalink
responsive tweaks, link back to login from signup
Browse files Browse the repository at this point in the history
  • Loading branch information
timcowlishaw committed Nov 21, 2024
1 parent 9a5cb3c commit 4338c49
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
5 changes: 4 additions & 1 deletion app/assets/stylesheets/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ body > .container {
font-size: 2rem;
border: 2px solid $black;
vertical-align: middle;
display: inline-block;
margin-top: 1px;
margin-bottom: 1px;
margin-left: -0.5rem;
Expand All @@ -86,6 +85,10 @@ input:checked[type="checkbox"] {
margin-left: 1rem;
}

.form-check-label {
display: inline;
}

.width-fit-content {
width: fit-content !important;
}
6 changes: 6 additions & 0 deletions app/views/ui/users/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,10 @@
<div class="mt-4">
<%= f.primary t(:new_user_submit), class: "btn btn-primary w-100 w-md-auto" %>
</div>
<div class="row mt-4">
<div class="col-md-12">
<h4 class="my-3"><%= t :new_user_login_heading %></h4>
<a class="btn btn-secondary w-100 w-md-auto" href="<%= new_ui_session_path %>"><%= t :new_user_login_link %></a>
</div>
</div>
<% end %>
4 changes: 3 additions & 1 deletion config/locales/views/users/en.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
en:
new_user_submit: "Sign up"
new_user_ts_and_cs_label_html: "I have read and accept the <a target=\"_blank\" href=\"https://smartcitizen.me/policy\">Terms and Conditions</a>"
new_user_ts_and_cs_label_html: "I accept the <a target=\"_blank\" href=\"https://smartcitizen.me/policy\">Terms and Conditions</a>"
new_user_success: "Thanks for signing up! You are now logged in."
new_user_login_heading: "Already have an account?"
new_user_login_link: "Log in"
4 changes: 2 additions & 2 deletions spec/features/user_management_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
visit "/login"
click_on "Sign up"
expect(page).to have_current_path(new_ui_user_path)
fill_in "Username", with: "myusername"
fill_in "Email", with: "user@example.com"
fill_in "Username", with: "myusername"
fill_in "Password", with: "password123"
fill_in "Password confirmation", with: "password123"
check "I have read and accept the Terms and Conditions"
check "I accept the Terms and Conditions"
click_on "Sign up"
expect(page).to have_content("Thanks for signing up! You are now logged in.")
end
Expand Down

0 comments on commit 4338c49

Please sign in to comment.