Handle errors in upload and sync form
This commit is contained in:
parent
18cc105c1e
commit
6ce1b7f928
6 changed files with 61 additions and 38 deletions
|
|
@ -27,6 +27,6 @@
|
|||
= render 'sync_table', articles: @new_articles, field: 'new_articles', hidden_fields: %w(shared_updated_on order_number)
|
||||
%hr/
|
||||
|
||||
- if @ignored_article_count > 0
|
||||
- if ignored_article_count > 0
|
||||
%p
|
||||
%i= t '.outlist.body_ignored', count: @ignored_article_count
|
||||
%i= t '.outlist.body_ignored', count: ignored_article_count
|
||||
|
|
|
|||
|
|
@ -51,3 +51,6 @@
|
|||
= form.text_field 'deposit', class: 'input-mini', style: 'width: 45px'
|
||||
%td= form.select :article_category_id, ArticleCategory.all.map {|a| [ a.name, a.id ] },
|
||||
{include_blank: true}, class: 'input-small'
|
||||
- unless changed_article.errors.empty?
|
||||
%tr.alert
|
||||
%td(colspan=11)= changed_article.errors.full_messages.join(', ')
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
- title t('.title', supplier: @supplier.name)
|
||||
|
||||
= form_tag update_synchronized_supplier_articles_path(@supplier) do
|
||||
= hidden_field_tag :from_action, 'parse_upload'
|
||||
= render 'sync'
|
||||
.form-actions
|
||||
= submit_tag t('.submit'), class: 'btn btn-primary'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
- title t('.title')
|
||||
|
||||
= form_tag update_synchronized_supplier_articles_path(@supplier) do
|
||||
= hidden_field_tag :from_action, 'sync'
|
||||
= render 'sync'
|
||||
= submit_tag t('.submit'), class: 'btn btn-primary'
|
||||
= link_to t('ui.or_cancel'), supplier_articles_path(@supplier)
|
||||
.form-actions
|
||||
= submit_tag t('.submit'), class: 'btn btn-primary'
|
||||
= link_to t('ui.or_cancel'), supplier_articles_path(@supplier)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue