= form_for @section, html: {class: 'form-horizontal' } do |f| = render 'error_messages', target: @section .control-group class=(@section.errors[:title].any? ? 'error' : nil) = f.label :title, class: 'control-label' .controls = f.text_field :title, class: 'text_field' .control-group class=(@section.errors[:path].any? ? 'error' : nil) = f.label :path, class: 'control-label' .controls = f.text_field :path, class: 'text_field' .control-group class=(@section.errors[:supplier_id].any? ? 'error' : nil) = f.label :supplier_id, Supplier.model_name.human, class: 'control-label' .controls = f.collection_select :supplier_id, @suppliers, :id, :name, include_blank: nil .form-actions = f.submit nil, class: 'btn btn-primary' ' = link_to t("helpers.links.cancel"), sections_path, class: 'btn'