-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy path_form.html.erb
More file actions
44 lines (36 loc) · 1.97 KB
/
_form.html.erb
File metadata and controls
44 lines (36 loc) · 1.97 KB
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
<%= form_with(model: @speaker_form, url: speaker_url, method: (action_name == 'edit' ? :patch : :post), local: true, data: { turbo: false }) do |form| %>
<section class="speaker-information py-3">
<a id="speaker"><h3 class="py-3">登壇者情報</h3></a>
<%= render('speaker_dashboard/speakers/form_speaker', form: form) %>
</section>
<section class="speaker-information py-3">
<a id="sessions"><h3 class="py-3">セッション情報</h3></a>
<p class="alert alert-info">
<%= link_to 'CFP要項を確認する', speakers_guidance_path, {target: :_blank, style: 'text-decoration: underline'} %>
</p>
<div class="talk-fields">
<% @speaker_form.talks.each_with_index do |talk_obj, index| %>
<%= form.fields_for :talks_attributes, talk_obj, index: index do |talk| %>
<%= render 'speaker_dashboard/speakers/talk_fields', :f => talk, :conference => @conference, :form_index => index %>
<% end %>
<% end %>
</div>
<% if @conference.speaker_entry_enabled? || @sponsor || admin? %>
<% if action_name == "new" || form.object.talks.size < 3 %>
<p class="alert alert-info">追加ボタンを押すとセッションを最大3件まで登録できます。またエントリー後にダッシュボードから更新可能です。</p>
<p><%= link_to_add_talk_fields "セッションを追加する", form, :talks, class: 'add-talk btn btn-primary' %></p>
<% else %>
<p><%= link_to_add_talk_fields "セッションを追加する", form, :talks, class: 'add-talk btn btn-primary', style: "display: none" %></p>
<% end %>
<% end %>
</section>
<section class="privacy">
<div class="field py-3">
<%= form.hidden_field :conference_id, value: @conference.id %>
<%= markdown @conference.privacy_policy_for_speaker %>
</div>
</section>
<div class="actions justify-content-center py-3">
<%= form.submit class: "btn btn-primary btn-lg btn-block" %>
</div>
<% end %>