akaunting/resources/views/common/items/create.blade.php

50 lines
2.0 KiB
PHP
Raw Normal View History

2017-09-14 22:21:00 +03:00
@extends('layouts.admin')
@section('title', trans('general.title.new', ['type' => trans_choice('general.items', 1)]))
@section('content')
2019-11-16 10:21:14 +03:00
<div class="card">
{!! Form::open([
'route' => 'items.store',
'id' => 'item',
'@submit.prevent' => 'onSubmit',
'@keydown' => 'form.errors.clear($event.target.name)',
'files' => true,
'role' => 'form',
'class' => 'form-loading-button',
'novalidate' => true
]) !!}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
<div class="card-body">
<div class="row">
{{ Form::textGroup('name', trans('general.name'), 'tag') }}
2017-09-14 22:21:00 +03:00
2020-12-08 13:30:06 +03:00
{{ Form::multiSelectAddNewGroup('tax_ids', trans_choice('general.taxes', 1), 'percentage', $taxes, [setting('default.tax')], ['path' => route('modals.taxes.create'), 'field' => ['key' => 'id', 'value' => 'title']]) }}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::textareaGroup('description', trans('general.description')) }}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::textGroup('sale_price', trans('items.sales_price'), 'money-bill-wave') }}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::textGroup('purchase_price', trans('items.purchase_price'), 'money-bill-wave-alt') }}
2017-09-14 22:21:00 +03:00
2020-02-15 15:10:25 +03:00
{{ Form::selectAddNewGroup('category_id', trans_choice('general.categories', 1), 'folder', $categories, null, ['path' => route('modals.categories.create') . '?type=item']) }}
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
{{ Form::fileGroup('picture', trans_choice('general.pictures', 1), 'plus') }}
2017-09-14 22:21:00 +03:00
2019-12-14 10:03:41 +03:00
{{ Form::radioGroup('enabled', trans('general.enabled'), true) }}
2018-05-01 16:35:56 +03:00
</div>
</div>
2017-09-14 22:21:00 +03:00
2019-11-16 10:21:14 +03:00
<div class="card-footer">
2020-02-15 13:04:37 +03:00
<div class="row save-buttons">
{{ Form::saveButtons('items.index') }}
2019-11-16 10:21:14 +03:00
</div>
</div>
{!! Form::close() !!}
2017-09-14 22:21:00 +03:00
</div>
@endsection
2019-11-16 10:21:14 +03:00
@push('scripts_start')
<script src="{{ asset('public/js/common/items.js?v=' . version('short')) }}"></script>
2017-11-13 21:55:15 +03:00
@endpush