diff --git a/app/views/articles/_edit_all_table.html.haml b/app/views/articles/_edit_all_table.html.haml index 3cbf1412..bd9441f7 100644 --- a/app/views/articles/_edit_all_table.html.haml +++ b/app/views/articles/_edit_all_table.html.haml @@ -19,7 +19,9 @@ - @articles.each_with_index do |article, index| = fields_for "articles[#{article.id || index}]", article do |form| %tr - %td= form.check_box 'availability' + %td + = yield form # allow to add hidden fields to form + = form.check_box 'availability' %td= form.text_field 'name', class: 'input-medium' %td= form.text_field 'unit', class: 'input-mini' %td= form.text_field 'price', class: 'input-mini' diff --git a/app/views/articles/parse_upload.html.haml b/app/views/articles/parse_upload.html.haml index edd34e88..9f322946 100644 --- a/app/views/articles/parse_upload.html.haml +++ b/app/views/articles/parse_upload.html.haml @@ -2,7 +2,9 @@ %p= t('.body').html_safe = form_tag(create_from_upload_supplier_articles_path(@supplier)) do - = render 'edit_all_table' + = render layout: 'edit_all_table' do |form| + = form.hidden_field :manufacturer + = form.hidden_field :origin .form-actions = submit_tag t('.submit', supplier: @supplier.name), class: 'btn btn-primary' = link_to t('ui.or_cancel'), upload_supplier_articles_path(@supplier)