18 lines
526 B
Plaintext
18 lines
526 B
Plaintext
<div class="text-field" id="<%= dom_id(text_field) %>">
|
|
<% if @editable %>
|
|
<%= link_to t(".delete"), text_field,
|
|
data: { turbo_method: :delete, turbo_confirm: t(".confirm_delete", name: text_field.name) } %>
|
|
<% end %>
|
|
|
|
<h6><%= text_field.name %></h6>
|
|
<% if @editable %>
|
|
<%= form_with model: text_field, class: "text-field-form" do |f| %>
|
|
<%= f.rich_text_area :content %>
|
|
<%= f.submit t(".save") %>
|
|
<% end %>
|
|
<% else %>
|
|
<p><%= text_field.content %></p>
|
|
<% end %>
|
|
</div>
|
|
|