= form_for [:suppliers, @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[:width].any? ? 'error' : nil) = f.label :width, class: 'control-label' .controls = f.text_field :width, class: ['text_field', :numeric] .control-group class=(@section.errors[:height].any? ? 'error' : nil) = f.label :height, class: 'control-label' .controls = f.text_field :height, class: ['text_field', :numeric] .form-actions = f.submit nil, class: 'btn btn-primary' - unless f.object.new_record? ' = link_to t('supplier.tables.qr_codes.link'), qr_codes_suppliers_tables_path(section_id: @section.id), class: 'btn btn-info', data: {t: 'tables.qr_codes.link'} ' = link_to t("helpers.links.cancel"), suppliers_sections_path, class: 'btn'