43 lines
1.8 KiB
Plaintext
43 lines
1.8 KiB
Plaintext
<%= form_with(model: party, class: "contents") do |form| %>
|
|
<% if party.errors.any? %>
|
|
<div id="error_explanation" class="bg-red-50 text-red-500 px-3 py-2 font-medium rounded-md mt-3">
|
|
<h2><%= pluralize(party.errors.count, "error") %> prohibited this party from being saved:</h2>
|
|
|
|
<ul class="list-disc ml-6">
|
|
<% party.errors.each do |error| %>
|
|
<li><%= error.full_message %></li>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div class="my-5">
|
|
<%= form.label :title %>
|
|
<%= form.text_field :title, class: [{"border-gray-400 focus:outline-blue-600": party.errors[:title].none?, "border-red-400 focus:outline-red-600": party.errors[:title].any?}] %>
|
|
</div>
|
|
|
|
<div class="my-5">
|
|
<%= form.label :location %>
|
|
<%= form.text_field :location, class: [{"border-gray-400 focus:outline-blue-600": party.errors[:location].none?, "border-red-400 focus:outline-red-600": party.errors[:location].any?}] %>
|
|
</div>
|
|
|
|
<div class="my-5">
|
|
<%= form.label :start_date %>
|
|
<%= form.date_field :start_date, class: [{"border-gray-400 focus:outline-blue-600": party.errors[:start_date].none?, "border-red-400 focus:outline-red-600": party.errors[:start_date].any?}] %>
|
|
</div>
|
|
|
|
<div class="my-5">
|
|
<%= form.label :start_time %>
|
|
<%= form.time_field :start_time, class: [{"border-gray-400 focus:outline-blue-600": party.errors[:start_time].none?, "border-red-400 focus:outline-red-600": party.errors[:start_time].any?}] %>
|
|
</div>
|
|
|
|
<div class="my-5">
|
|
<%= form.label :status %>
|
|
<%= form.text_field :status, class: [{"border-gray-400 focus:outline-blue-600": party.errors[:status].none?, "border-red-400 focus:outline-red-600": party.errors[:status].any?}] %>
|
|
</div>
|
|
|
|
<div class="inline">
|
|
<%= form.submit "Speichern" %>
|
|
</div>
|
|
<% end %>
|