Skip to content

Commit

Permalink
event form
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienpoly committed Sep 16, 2024
1 parent 6578f49 commit d33602e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
15 changes: 3 additions & 12 deletions app/views/events/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,16 @@

<div class="my-5">
<%= form.label :description %>
<%= form.text_area :description, rows: 4, class: "input input-bordered w-full" %>
<%= form.text_area :description, rows: 4, class: "textarea textarea-bordered w-full" %>
</div>

<div class="my-5">
<%= form.label :website %>
<%= form.text_field :website, class: "input input-bordered w-full" %>
</div>

<div class="my-5">
<%= form.label :kind %>
<%= form.number_field :kind, class: "input input-bordered w-full" %>
</div>

<div class="my-5">
<%= form.label :frequency %>
<%= form.number_field :frequency, class: "input input-bordered w-full" %>
</div>

<div class="inline">
<%= form.submit class: "rounded-lg py-3 px-5 bg-blue-600 text-white inline-block font-medium cursor-pointer" %>
<%= ui_button "Suggest modifications", type: :submit %>
<%= ui_button "Cancel", url: event_path(event), outline: true, role: :button %>
</div>
<% end %>
3 changes: 0 additions & 3 deletions app/views/events/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@
<h1 class="font-bold text-4xl">Editing event</h1>

<%= render "form", event: @event %>
<%= link_to "Show this event", @event, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
<%= link_to "Back to events", events_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
</div>

0 comments on commit d33602e

Please sign in to comment.