/
edit.html.erb
54 lines (42 loc) · 2.38 KB
/
edit.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<%= render layout: "layouts/decidim/shared/layout_center" do %>
<div class="text-center py-12">
<h1 class="h3 md:h1 decorator inline-block text-left mb-12"><%= t "devise.invitations.edit.header" %></h1>
<p class="text-lg text-gray-2">
<%= t("devise.invitations.edit.subtitle").html_safe %>
</p>
</div>
<%= decidim_form_for resource, namespace: "invitation", as: resource_name, url: invitation_path(resource_name, invite_redirect: params[:invite_redirect]), html: { method: :put, class: "register-form new_user" } do |f| %>
<%= form_required_explanation %>
<div class="form__wrapper">
<%= f.hidden_field :invitation_token %>
<%= f.text_field :nickname, help_text: t("devise.invitations.edit.nickname_help", organization: current_organization.name), required: "required", autocomplete: "nickname" %>
<% if f.object.class.require_password_on_accepting %>
<%= render partial: "decidim/account/password_fields", locals: { form: f, user: :user } %>
<% end %>
</div>
<div class="form__wrapper-block">
<h4 class="h4"><%= t("tos_title", scope: "decidim.devise.registrations.new") %></h4>
<div class="tos-text">
<% terms_of_service_summary_content_blocks.each do |content_block| %>
<%= cell content_block.manifest.cell, content_block %>
<% end %>
</div>
<% link = link_to t("terms", scope: "decidim.devise.registrations.new"), page_path("terms-and-conditions"), target: "_blank" %>
<% label = t("tos_agreement", scope: "decidim.devise.registrations.new", link:) %>
<%= f.check_box :tos_agreement, label:, required: "required", label_options: { class: "form__wrapper-checkbox-label" } %>
</div>
<div class="form__wrapper-block">
<h4 class="h4"><%= t("newsletter_title", scope: "decidim.devise.registrations.new") %></h4>
<%= label_tag :"#{resource_name}[newsletter_notifications]", class: "form__wrapper-checkbox-label" do %>
<%= check_box_tag :"#{resource_name}[newsletter_notifications]" %>
<%= t("newsletter", scope: "decidim.devise.registrations.new") %>
<% end %>
</div>
<div class="form__wrapper-block">
<button type="submit" class="button button__lg button__secondary">
<%= t("devise.invitations.edit.submit_button") %>
<%= icon "arrow-right-line", class: "fill-current" %>
</button>
</div>
<% end %>
<% end %>