Sha256: 5277265a2f3dc77ffb32c81db298cc91e3c476824423f19ed1fea18092140b70
Contents?: true
Size: 1.8 KB
Versions: 1
Compression:
Stored size: 1.8 KB
Contents
<%- if defined?(SimpleForm) -%> <%%= simple_form_for(@<%= singular_table_name %>, <%= KisoThemes.key_value :wrapper, ":horizontal_form" %>, wrapper_mappings: { check_boxes: :horizontal_radio_and_checkboxes, radio_buttons: :horizontal_radio_and_checkboxes, file: :horizontal_file_input, boolean: :horizontal_boolean }, <%= KisoThemes.key_value :html, '{ ' + KisoThemes.key_value(:class, "'form-horizontal'") + ' }' %>) do |f| %> <%%= f.error_notification %> <div class="form-inputs"> <%- attributes.each do |attribute| -%> <%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> %> <%- end -%> </div> <div class="d-flex"> <div class="ml-auto"> <%%= f.button :submit %> <%%= f.button :cancel, <%= KisoThemes.key_value :to, "#{index_helper}_path" %> %> </div> </div> <%% end %> <%- else -%> <%%= form_for(@<%= singular_table_name %>, <%= KisoThemes.key_value :html, '{ ' + KisoThemes.key_value(:class, "'form-horizontal'") + ' }' %>) do |f| %> <%%= f.error_notification %> <div class="form-inputs"> <%- attributes.each do |attribute| -%> <%%= f.form_group :<%= attribute.name %>, class: 'row' do |f| %> <%%= f.label :<%= attribute.name %>, <%= KisoThemes.key_value :class, "'control-label col-md-2'" %> %> <div class='col-12 col-md-10'> <%%= f.<%= attribute.field_type %> :<%= attribute.name %>, <%= KisoThemes.key_value :class, "'form-control'" %> %> <%%= f.error_messages %> </div> <%% end %> <%- end -%> </div> <div class="d-flex"> <div class="ml-auto"> <%%= f.submit <%= KisoThemes.key_value :class, "'btn btn-primary'" %> %> <%%= link_to "Cancel", <%= index_helper %>_path, <%= KisoThemes.key_value :class, "'btn btn-outline-default'" %> %> </div> </div> <%% end %> <%- end -%>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kiso_themes-1.0.2 | lib/templates/erb/scaffold/_form.html.erb |