lib/templates/erb/scaffold/_form.html.erb in chaltron-0.3.2 vs lib/templates/erb/scaffold/_form.html.erb in chaltron-1.0.0

- old
+ new

@@ -1,6 +1,6 @@ -<%%= bootstrap_form_for(@<%= singular_table_name %>, layout: :horizontal) do |f| %> +<%%= bootstrap_form_for(@<%= singular_table_name %>, layout: :horizontal, label_col: 'col-sm-2 col-form-label', control_col: 'col-sm-10') do |f| %> <% attributes.each do |attribute| -%> <% if attribute.field_type == :check_box -%> <%%= f.form_group :<%= attribute.name %>, label: { text: '<%= attribute.name %>' } do %> <%%= f.<%= attribute.field_type %> :<%= attribute.name %>, label: '' %> @@ -8,11 +8,14 @@ <% else -%> <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %> <% end -%> <% end -%> - <%%= f.form_group class: 'form-actions' do %> - <%%= f.submit 'Submit', class: 'btn btn-primary' %> - <%%= back_link class: 'btn btn-default pull-right' %> - <%% end %> + <div class='form-group row'> + <div class='col-sm-2'></div> + <div class='col-sm-10'> + <%%= f.submit 'Submit', class: 'btn btn-primary' %> + <%%= back_link class: 'btn btn-default pull-right' %> + </div> + </div> <%% end %>