mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-17 22:51:24 +08:00
30c5b1675f
* Fix form errors in users invitation edit [SCI-8595] Co-authored-by: Sboursen <dev.sboursen@gmail.com> * Fix form errors in users confirmation new [SCI-8595] Co-authored-by: Sboursen <dev.sboursen@gmail.com> * Fix form errors in users registration [SCI-8595] Co-authored-by: Sboursen <dev.sboursen@gmail.com> --------- Co-authored-by: Sboursen <dev.sboursen@gmail.com>
33 lines
1.3 KiB
Text
33 lines
1.3 KiB
Text
<% provide(:head_title, t('users.registrations.new.head_title')) %>
|
|
|
|
<div class="center-block center-block-narrow">
|
|
<h2><%= t 'users.registrations.new_with_provider.head_title' %></h2>
|
|
<div data-hook="sign-up-form-hook">
|
|
<%= form_for(:team, as: resource_name, url: users_complete_sign_up_provider_path, html: { id: "sign-up-provider-form" } ) do |f| %>
|
|
<%= hidden_field_tag :user, params['user'] %>
|
|
|
|
<% if Rails.configuration.x.new_team_on_signup %>
|
|
<div class="form-group" id="team_name_form">
|
|
<%= f.label :name, t('users.registrations.new.team_name_label') %>
|
|
<%= f.text_field :name, autofocus: true, class: 'form-control',
|
|
placeholder: t('users.registrations.new.team_name_placeholder') %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div class="form-group" data-hook="sign-up-form-submit">
|
|
<%= f.submit 'Sign up', class: 'btn btn-primary' %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
<%= render 'users/shared/links' %>
|
|
</div>
|
|
|
|
<% if @team && @team.errors.present? %>
|
|
<% form_errors = {} %>
|
|
|
|
<% @team.errors.each do |err, msg| %>
|
|
<% form_errors[err] = [msg] %>
|
|
<% end %>
|
|
<div class="hidden" id="form-error-data" data-form-errors="<%= form_errors.to_json %>"></div>
|
|
<%= javascript_include_tag 'users/registrations/new_with_provider', nonce: true %>
|
|
<% end %>
|