refs #1147 invoice item create inline..
This commit is contained in:
25
resources/views/modals/items/create.blade.php
Normal file
25
resources/views/modals/items/create.blade.php
Normal file
@@ -0,0 +1,25 @@
|
||||
{!! Form::open([
|
||||
'route' => 'items.store',
|
||||
'id' => 'item',
|
||||
'@submit.prevent' => 'onSubmit',
|
||||
'@keydown' => 'form.errors.clear($event.target.name)',
|
||||
'role' => 'form',
|
||||
'class' => 'form-loading-button',
|
||||
'novalidate' => true
|
||||
]) !!}
|
||||
<div class="row">
|
||||
{{ Form::textGroup('name', trans('general.name'), 'tag') }}
|
||||
|
||||
{{ Form::selectAddNewGroup('tax_id', trans_choice('general.taxes', 1), 'percentage', $taxes, setting('default.tax'), ['path' => route('modals.taxes.create')]) }}
|
||||
|
||||
{{ Form::textareaGroup('description', trans('general.description')) }}
|
||||
|
||||
{{ Form::textGroup('sale_price', trans('items.sales_price'), 'money-bill-wave') }}
|
||||
|
||||
{{ Form::textGroup('purchase_price', trans('items.purchase_price'), 'money-bill-wave-alt') }}
|
||||
|
||||
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, null, ['required' => 'required', 'path' => route('modals.categories.create') . '?type=item']) }}
|
||||
|
||||
{!! Form::hidden('enabled', '1', []) !!}
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
@@ -38,6 +38,10 @@
|
||||
:form-error="form.errors.get('{{ $name }}')"
|
||||
@endif
|
||||
|
||||
:remote-action="'{{ $attributes['remote_action'] }}'"
|
||||
:remote-type="'{{ $attributes['remote_type'] }}'"
|
||||
:currency-code="{{ $attributes['currecny_code'] }}"
|
||||
|
||||
:loading-text="'{{ trans('general.loading') }}'"
|
||||
:no-data-text="'{{ trans('general.no_data') }}'"
|
||||
:no-matching-data-text="'{{ trans('general.no_matching_data') }}'"
|
||||
|
||||
@@ -24,22 +24,10 @@
|
||||
:value="'{{ old('item_id', '') }}'"
|
||||
:add-new="{{ json_encode([
|
||||
'status' => true,
|
||||
'text' => trans('general.form.add_new', ['field' => trans_choice('general.items', 1)]),
|
||||
'path' => isset($attributes['path']) ? $attributes['path']: false,
|
||||
'type' => isset($attributes['type']) ? $attributes['type'] : 'modal',
|
||||
'field' => isset($attributes['field']) ? $attributes['field'] : 'name',
|
||||
'buttons' => [
|
||||
'cancel' => [
|
||||
'text' => trans('general.cancel'),
|
||||
'icon' => 'fas fa-times',
|
||||
'class' => 'btn-outline-secondary'
|
||||
],
|
||||
'confirm' => [
|
||||
'text' => trans('general.save'),
|
||||
'icon' => 'fas fa-save',
|
||||
'class' => 'btn-success'
|
||||
]
|
||||
]
|
||||
'text' => trans('general.form.add_new', ['field' => '']),
|
||||
'path' => route('modals.items.store'),
|
||||
'type' => 'inline',
|
||||
'field' => 'name',
|
||||
])}}"
|
||||
@interface="row.item_id = $event"
|
||||
@label="row.name = $event"
|
||||
|
||||
Reference in New Issue
Block a user