Sha256: 42fef6439f676fa8907253e29c96cf90c3580f7e5785c52940ac5f2e8c0194f9
Contents?: true
Size: 855 Bytes
Versions: 2
Compression:
Stored size: 855 Bytes
Contents
<%# name: headmin/fields/checkbox accepts block: no parameters: form: Form object attribute: Name of the attribute of the form model label: (bool) Label will not be displayed if value is false %> <% label = local_assigns.has_key?(:label) ? label : true %> <% required = local_assigns.has_key?(:required) ? required : false %> <div class="<%= ('mb-3 text-start' if label) %>"> <div class="form-check"> <%= form.check_box( attribute, class: "form-check-input #{form_field_validation_class(form, attribute)}", required: required, 'aria-describedby': form_field_validation_id(form, attribute)) %> <%= form.label attribute, class: 'form-check-label', required: required %> <%= render 'headmin/forms/fields/validation', form: form, attribute: attribute %> </div> </div>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
headmin-0.1.2 | app/views/headmin/forms/fields/_checkbox.html.erb |
headmin-0.1.1 | app/views/headmin/forms/fields/_checkbox.html.erb |