Skip to content

Commit d25ae12

Browse files
committed
Fix checkboxes to use materialize checkboxes
Before there was a hack in place to not use materialize checkboxes because the actual checkbox didn't show up. This re-arranges all the checkboxes I could find to work with materialize, thus allowing the hack to be safely removed. The forum (namely preferences) continue to use the hacky checkbox, but that hack is maintained separately and still seems to work with this change.
1 parent c7f5f85 commit d25ae12

File tree

5 files changed

+16
-24
lines changed

5 files changed

+16
-24
lines changed

app/assets/stylesheets/fixes.scss

Lines changed: 0 additions & 11 deletions
This file was deleted.

app/views/devise/registrations/new.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@
6060
%>
6161

6262
<div class="field">
63-
<%= f.check_box :email_updates %>
6463
<%= f.label :email_updates do %>
65-
We're always working to improve Notebook.ai. Please leave this box checked if you'd like to receive occasional updates about
66-
what's new.
64+
<%= f.check_box :email_updates %>
65+
<span>We're always working to improve Notebook.ai. Please leave this box checked if you'd like to receive occasional updates about
66+
what's new.</span>
6767
<% end %>
6868
</div>
6969

app/views/devise/registrations/panes/_preferences.html.erb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<div class="card-content">
33
<h4>Your Notebook.ai design</h4>
44
<div class="field">
5-
<%= f.check_box :fluid_preference %>
65
<%= f.label :fluid_preference do %>
7-
I want to use <strong>full-width</strong> Notebook.ai. Great for small screens, but not so much for very large ones.
6+
<%= f.check_box :fluid_preference %>
7+
<span>I want to use <strong>full-width</strong> Notebook.ai. Great for small screens, but not so much for very large ones.</span>
88
<% end %>
99
</div>
1010
</div>
@@ -14,9 +14,9 @@
1414
<div class="card-content">
1515
<h4>Email preferences</h4>
1616
<div class="field">
17-
<%= f.check_box :email_updates %>
1817
<%= f.label :email_updates do %>
19-
I want to receive occasional updates by email about new Notebook.ai features.
18+
<%= f.check_box :email_updates %>
19+
<span>I want to receive occasional updates by email about new Notebook.ai features.</span>
2020
<% end %>
2121
</div>
2222
</div>

app/views/devise/sessions/_form.html.erb

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,21 @@
1313
</div>
1414

1515
<div class="actions center">
16+
<div class="col s6">
1617
<% if devise_mapping.rememberable? -%>
17-
<span class="field" style="margin-right: 30px;">
18+
<%= f.label :remember_me do %>
1819
<%= f.check_box :remember_me %>
19-
<%= f.label :remember_me %>
20-
</span>
20+
<span>Remember me</span>
21+
<% end %>
2122
<% end -%>
22-
<%= f.submit "Log in", class: 'btn blue' %>
23+
</div>
24+
<div class="col s6">
25+
<%= f.submit "Log in", class: 'btn blue' %>
26+
</div>
2327

2428
<p class="center">
2529
<br />
2630
<%= render "devise/shared/links" %>
2731
</p>
2832
</div>
29-
<% end %>
33+
<% end %>

db/schema.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1958,7 +1958,6 @@
19581958
t.datetime "updated_at", null: false
19591959
t.index ["messageboard_id"], name: "index_thredded_posts_on_messageboard_id"
19601960
t.index ["moderation_state", "updated_at"], name: "index_thredded_posts_for_display"
1961-
t.index ["postable_id"], name: "index_thredded_posts_on_postable_id"
19621961
t.index ["postable_id"], name: "index_thredded_posts_on_postable_id_and_postable_type"
19631962
t.index ["user_id"], name: "index_thredded_posts_on_user_id"
19641963
end

0 commit comments

Comments
 (0)