<%= t 'devise.invitations.edit.header' %>
<%= form_for (resource or :user), as: resource_name, url: invitation_path(resource_name), html: { method: :put, id: 'invitation-form' } do |f| %>
<%= f.hidden_field :invitation_token %>
<%= f.label :full_name %>
<%= f.text_field :full_name,
value: (params[:user] ? params[:user][:full_name] : ''),
autofocus: true,
class: 'sci-input-field' %>
<% if Rails.configuration.x.new_team_on_signup %>
<%= label :team, :name, t('users.registrations.new.team_name_label') %>
<% if @team %>
<%= text_field :team, :name, class: 'sci-input-field', value: @team.name %>
<% else %>
<%= text_field :team,
:name,
class: 'form-control',
value: (params[:team] ? params[:team][:name] : '') %>
<% end %>
<% end %>
<%= recaptcha_input_tag %>
<%= f.submit "Sign Up", class: "btn btn-primary invitation-submit" %>
<% end %>
<%= render partial: 'users/sessions/login_disclaimer'%>
<% if resource && resource.errors.present? %>
<% form_errors = {} %>
<% resource.errors.as_json.each do |err, messages| %>
<% form_errors[err] = [] %>
<% messages.each do |message| %>
<% form_errors[err].push(message) %>
<% end %>
<% end %>