Skip to content

Commit

Permalink
Merge pull request #684 from portagenetwork/aaron/issues/665
Browse files Browse the repository at this point in the history
Add Terms and Conditions For Invitation Form
  • Loading branch information
aaronskiba authored Apr 8, 2024
2 parents 280d8f6 + de1e238 commit c0e2cb1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

- Bump mysql2 from 0.5.5 to 0.5.6 [#645](https://github.com/portagenetwork/roadmap/pull/645)

- Added "Accept terms and conditions" checkbox to invitation form [#684](https://github.com/portagenetwork/roadmap/pull/684)

### Fixed

- Updated Webmock's allowed request list to enable fetching of chromedriver [#670](https://github.com/portagenetwork/roadmap/pull/670)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def from_external_domain?
end

def configure_permitted_parameters
devise_parameter_sanitizer.permit(:accept_invitation, keys: %i[firstname surname org_id])
devise_parameter_sanitizer.permit(:accept_invitation, keys: %i[firstname surname org_id accept_terms])
end

def render_not_found(exception)
Expand Down
9 changes: 9 additions & 0 deletions app/views/devise/invitations/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@
required: true
} %>
</div>
<div class="form-group">
<div class="checkbox">
<%= f.label(:accept_terms) do %>
<%= f.check_box(:accept_terms, "aria-required": true, required: true) %>
<%= _('I accept the') %>
<%= link_to _('terms and conditions'), terms_of_use_path %>
<% end %>
</div>
</div>
<%= f.button(_('Create account'), class: "btn btn-default", type: "submit") %>
<% end %>
</div>
Expand Down

0 comments on commit c0e2cb1

Please sign in to comment.