mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-28 03:06:28 +08:00
Merge pull request #316 from okriuchykhin/ok_SCI_738
Add full name field to accept invitation form [SCI-738]
This commit is contained in:
commit
5981d1a48e
3 changed files with 16 additions and 1 deletions
|
@ -6,6 +6,8 @@ module Users
|
|||
|
||||
before_action :check_invite_users_permission, only: :invite_users
|
||||
|
||||
before_filter :update_sanitized_params, only: :update
|
||||
|
||||
def update
|
||||
# Instantialize a new organization with the provided name
|
||||
@org = Organization.new
|
||||
|
@ -148,6 +150,11 @@ module Users
|
|||
|
||||
private
|
||||
|
||||
def update_sanitized_params
|
||||
# Solution for Devise < 4.0.0
|
||||
devise_parameter_sanitizer.for(:accept_invitation) << :full_name
|
||||
end
|
||||
|
||||
def check_captcha
|
||||
if Rails.configuration.x.enable_recaptcha
|
||||
unless verify_recaptcha
|
||||
|
|
|
@ -8,12 +8,17 @@
|
|||
|
||||
<%= f.hidden_field :invitation_token %>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.label :full_name %>
|
||||
<%= f.text_field :full_name, value: '', autofocus: true, class: "form-control" %>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= f.label :password %>
|
||||
<% if @minimum_password_length %>
|
||||
<em>(<%= @minimum_password_length %> characters minimum)</em>
|
||||
<% end %>
|
||||
<%= f.password_field :password, autofocus: true, autocomplete: "off", class: "form-control" %>
|
||||
<%= f.password_field :password, autocomplete: "off", class: "form-control" %>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
|
|
@ -5,6 +5,9 @@ en:
|
|||
head_title: "Resend confirmation instructions"
|
||||
title: "Resend confirmation instructions"
|
||||
submit: "Resend confirmation instructions"
|
||||
invitations:
|
||||
edit:
|
||||
header: "Set your full name and password"
|
||||
passwords:
|
||||
edit:
|
||||
head_title: "Change password"
|
||||
|
|
Loading…
Reference in a new issue