supplier improvements

This commit is contained in:
2013-03-09 14:18:21 +01:00
parent 730f910881
commit cc13797f5a
53 changed files with 819 additions and 156 deletions
+3 -3
View File
@@ -1,13 +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'
= 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, Supplier.model_name.human, class: 'control-label'
= f.label :section_id, Section.model_name.human, class: 'control-label', data: {t: 'models.section'}
.controls
= f.collection_select :section_id, current_supplier.sections, :id, :title, include_blank: "[#{t('table.has_no_section')}]"
= f.collection_select :section_id, current_supplier.sections, :id, :title, include_blank: "[#{t('supplier.tables.has_no_section')}]"
.form-actions
= f.submit nil, class: 'btn btn-primary'
'