End of week commit

This commit is contained in:
2014-04-18 20:38:13 +02:00
parent 2a5331471c
commit 821f59b761
42 changed files with 304 additions and 91 deletions
+9 -7
View File
@@ -1,11 +1,13 @@
= form_for [:suppliers, @table], html: {class: 'form-horizontal' } do |f|
= render 'error_messages', target: @table
.control-group class=(@table.errors[:number].any? ? 'error' : nil)
= f.label :number, class: 'control-label', data: {t: 'attributes.table.number'}
.controls
= f.text_field :number, class: 'text_field'
.control-group class=(@table.errors[:section_id].any? ? 'error' : nil)
= f.label :section_id, Section.model_name.human, class: 'control-label', data: {t: 'models.section'}
.controls
.form-row class=(@table.errors[:number].any? ? 'error' : nil)
.form-label
= f.label :number
.form-field
= f.number_field :number
.form-row class=(@table.errors[:section_id].any? ? 'error' : nil)
.form-label
= f.label :section_id, Section.model_name.human, class: 'control-label', data: {t: 'models.section'}
.form-field
= f.collection_select :section_id, current_supplier.sections, :id, :title, include_blank: "[#{t('supplier.tables.has_no_section')}]"
= f.supplier_form_actions