scinote-web/app/components/reports/multi_checkbox_input_component.html.erb
2021-04-20 13:57:09 +02:00

14 lines
416 B
Text

<div>
<%= label_tag "#{@name}[]", @label %>
<ul>
<% @items.each do |key, value| %>
<li>
<div class="sci-checkbox-container">
<%= check_box_tag "#{@name}[]", key, (@value && @value[key.to_s] == 'true'), class: 'sci-checkbox', data: { type: 'MultiCheckboxInputComponent' } %>
<span class="sci-checkbox-label"></span>
</div>
<%= value %>
</li>
<% end %>
</ul>
</div>