Adding notifications_enabled attribute to users

This diff just contains the migration and profile edition.

Refers to [This Project Card](https://github.com/riggraz/astuto/projects/1#card-31194036) and #33
This commit is contained in:
Kevin Vinhas
2021-01-26 23:42:36 +01:00
committed by Riccardo Graziosi
parent 0cc130a797
commit 9dfb13eff6
8 changed files with 70 additions and 16 deletions

View File

@@ -16,6 +16,11 @@
</small>
</div>
<div class="form-group">
<%= f.label :notifications_enabled %>
<%= f.check_box :notifications_enabled %>
</div>
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
<% end %>

View File

@@ -7,7 +7,7 @@
<%= f.label :full_name, class: "sr-only" %>
<%= f.text_field :full_name, autofocus: true, placeholder: "Full name", required: true, class: "form-control" %>
</div>
<div class="form-group">
<%= f.label :email, class: "sr-only" %>
<%= f.email_field :email, autocomplete: "email", placeholder: "Email address", required: true, class: "form-control" %>
@@ -23,9 +23,14 @@
<%= f.password_field :password_confirmation, placeholder: "Password confirmation", required: true, class: "form-control" %>
</div>
<div class="form-group">
<%= f.label :notifications_enabled %>
<%= f.check_box :notifications_enabled %>
</div>
<div class="actions">
<%= f.submit "Sign up", class: "btn btn-block" %>
</div>
<% end %>
<%= render "devise/shared/links" %>
<%= render "devise/shared/links" %>