Hotwired wi[

This commit is contained in:
2021-09-22 16:40:20 +02:00
parent a0c72b0caf
commit 9a318249dc
21 changed files with 381 additions and 6 deletions

View File

@@ -0,0 +1,7 @@
<%= turbo_frame_tag dom_id(employer) do %>
<div class="card card-body">
<div>Something </div>
<div><%= employer.name %></div>
</div>
<% end %>

View File

@@ -0,0 +1,2 @@
json.extract! employer, :id, :name

View File

@@ -0,0 +1,5 @@
<%= turbo_frame_tag dom_id(employer) do %>
<div class="card card-body">
<div><%= @employer.name %></div>
</div>
<% end %>

View File

@@ -0,0 +1,2 @@
json.extract! employer, :id, :name

View File

@@ -0,0 +1,23 @@
<%= form_with(model: employer, id: dom_id(employer)) do |form| %>
<% if employer.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(employer.errors.count, "error") %> prohibited this employer from being saved:</h2>
<ul>
<% tweet.errors.each do |error| %>
<li><%= error.full_message %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= form.label :name %>
<%= form.text_area :name %>
</div>
<div class="actions">
<%= form.submit %>
</div>
<% end %>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
json.array! @employers, partial: "tweets/tweet", as: :employer

View File

@@ -2,7 +2,7 @@
<%= bootstrap_form_with model: model, local: true do |form| %>
V <%= form.text_field :name %>
<%= form.text_field :name %>
<%= form.time_zone_select(:shoot_location_time_zone, nil, label: "Time zone of shoot location") %> <div class="row align-items-center text-center mt-4">
<%= link_to t("shared.cancel"), [project, :broadcasts], class: "col-3 text-reset" %>
<div class="col-9">