Simplify generating checkboxes in forms

Using the block syntax to generate the label with a <span> tag inside
isn't necessary after upgrading foundation_rails_helpers. Before the
upgrade, we couldn't do so because the <span> tag was escaped.
This commit is contained in:
Javi Martín
2019-10-03 18:53:26 +02:00
parent 5fe56a62f1
commit 8d9cb4d8e3
14 changed files with 98 additions and 152 deletions

View File

@@ -105,18 +105,16 @@
<% if @investment.incompatible? || @investment.winner? %>
<div class="small-12 medium-3 column">
<h2 id="incompatible"><%= t("admin.budget_investments.edit.compatibility") %></h2>
<%= f.label :incompatible do %>
<%= f.check_box :incompatible, title: t("admin.budget_investments.edit.compatibility"), label: false %>
<span class="checkbox"><%= t("admin.budget_investments.edit.mark_as_incompatible") %></span>
<% end %>
<%= f.check_box :incompatible,
title: t("admin.budget_investments.edit.compatibility"),
label: t("admin.budget_investments.edit.mark_as_incompatible") %>
</div>
<% end %>
<div class="small-12 medium-3 column float-left">
<h2 id="selected"><%= t("admin.budget_investments.edit.selection") %></h2>
<%= f.label :selected do %>
<%= f.check_box :selected, title: t("admin.budget_investments.edit.selection"), label: false %>
<span class="checkbox"><%= t("admin.budget_investments.edit.mark_as_selected") %></span>
<% end %>
<%= f.check_box :selected,
title: t("admin.budget_investments.edit.selection"),
label: t("admin.budget_investments.edit.mark_as_selected") %>
</div>
</div>