Sha256: 572bf0ab619f503feae13ccc695ba52e813f44831714c4a5ac4bb1a24ac2fc91
Contents?: true
Size: 1.19 KB
Versions: 4
Compression:
Stored size: 1.19 KB
Contents
<% ## # Template per il rendering campo # - form -> FormBuilder # - form_field -> Array[String] %> <%# locals: (form:, form_field:) -%> <% button_group_classes = ["mb-1"] content = form_print_field(form, form_field) unless content.match "checkbox" button_group_classes << "input-group" end button_group_classes << (form.object.validated? ? "has-validation" : "") button_group_classes << "form-#{form_field}-input-group" # Non renderizziamo il contenuto del label in questa vista se siamo nello switch if content.match "form-switch" label_content = nil else label_content = form.label(form_field, class: ["form-label", "form-#{form_field}-label"]) end %> <%= label_content %> <%= content_tag :div, class: button_group_classes.join(" ") do %> <%= render partial: "editing_form_measure_unit", locals: {object: form.object, field: form_field} %> <%= content %> <%= error_messages_for(form.object, form_field) %> <% end %> <%= render partial: "editing_form_help_text", locals: {object: form.object, field: form_field} %> <%= content_for :form_field_ending %> <% content_for :form_field_ending, "", flush: true #RESET altrimenti ce lo troviamo nel successivo campo %>
Version data entries
4 entries across 4 versions & 1 rubygems