Cleanup StockArticle creation during delivery
This commit is contained in:
parent
e28f3eda65
commit
49cfa9aded
4 changed files with 10 additions and 20 deletions
|
|
@ -12,10 +12,16 @@
|
|||
})
|
||||
});
|
||||
|
||||
- content_for :javascript do
|
||||
:javascript
|
||||
$(function() {
|
||||
$('#add-stock-change').click();
|
||||
});
|
||||
|
||||
.well.well-small
|
||||
.btn-toolbar
|
||||
.btn-group
|
||||
= link_to t('.new_stock_article'), new_stock_article_supplier_deliveries_path(@supplier), remote: true, class: 'btn btn-primary'
|
||||
= link_to t('.new_stock_article'), new_stock_article_supplier_deliveries_path(@supplier), remote: true, class: 'btn'
|
||||
|
||||
= simple_form_for [@supplier, @delivery], validate: true do |f|
|
||||
= f.hidden_field :supplier_id
|
||||
|
|
@ -28,7 +34,7 @@
|
|||
= stock_change_form.hidden_field :_destroy
|
||||
= link_to t('.remove_article'), "#", class: 'destroy_stock_change'
|
||||
%p
|
||||
= link_to t('.add_article'), {action: 'add_stock_change', supplier_id: @supplier.id}, remote: true, class: 'btn btn-small'
|
||||
= link_to t('.add_article'), {action: 'add_stock_change', supplier_id: @supplier.id}, :id => 'add-stock-change', remote: true, class: 'btn btn-small btn-primary'
|
||||
%hr/
|
||||
= f.input :delivered_on, as: :date_picker
|
||||
= f.input :note, input_html: {size: '35x4'}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
= f.hidden_field :supplier_id
|
||||
.modal-header
|
||||
= link_to t('ui.marks.close').html_safe, '#', class: 'close', data: {dismiss: 'modal'}
|
||||
%h3= t '.title'
|
||||
%h3= t 'activerecord.models.stock_article'
|
||||
.modal-body
|
||||
= f.input :name
|
||||
= f.input :unit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue