Files
wedding/app/views/guests/show.html.erb
Rene 83e2424744
Some checks failed
CI / build (push) Has been cancelled
test
2025-09-16 19:32:32 +02:00

70 lines
2.5 KiB
Plaintext

<div class="container">
<div class="row">
<div class="offset-lg-2 col-lg-8">
<%= render partial: 'leader' %>
<%= render partial: 'rsvp_nav', locals: { active: 1 } %>
<h2>Über dich</h2>
<%= form_with(model: @guest, method: :patch, local: true, id: 'guest-edit-form') do |form| %>
<div class="row">
<div class="col-md-12">
<%= errors_for(@guest) %>
</div>
</div>
<div class="form-group row">
<div class="col-md-3">
<%= form.label :email, class: 'col-form-label' %>
<span class="wedding-required">*</span>
</div>
<div class="col-md-9">
<%= form.email_field :email, id: 'guest_email', class: 'form-control', required: true %>
</div>
</div>
<%= render partial: 'name', locals: { form: form, id_stem: 'guest' } %>
<div class="form-group row">
<div class="offset-md-3 col-md-9">
<p><strong>Bist du dabei?</strong></p>
<div class="form-check form-check-inline">
<%= form.radio_button :attending, 'true', checked: true, id: 'guest_attending_true', class: 'form-check-input' %>
<%= form.label :attending, 'Ja', value: 'true', class: 'form-check-label' %>
</div>
<div class="form-check form-check-inline">
<%= form.radio_button :attending, 'false', id: 'guest_attending_false', class: 'form-check-input' %>
<%= form.label :attending, 'Nein', value: 'false', class: 'form-check-label' %>
</div>
</div>
</div>
<div class="guest-attending-only">
<%= render partial: 'dietary_preferences', locals: { form: form, id_stem: 'guest' } %>
<div class="form-group row">
<div class="col-md-3">
<%= form.label :songs, 'Song Suggestions', class: 'col-form-label' %>
</div>
<div class="col-md-9">
<%= form.text_area :songs, id: 'guest_songs', class: 'form-control' %>
<small class="form-text text-muted">
Wir erstellen unsere Playlist gemeinsam mit euch! Schreibt uns ein paar Songs, die ihr hören möchtet.
</small>
</div>
</div>
</div>
<div class="row guests-buttons">
<div class="col-md-3">
<span class="wedding-required">* Erforderlich</span>
</div>
<div class="col-md-6 text-center">
<%= form.submit 'Weiter', class: 'btn btn-primary', data: { disable_with: 'Sending...' } %>
</div>
</div>
<% end %>
</div>
</div>
</div>