1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-16 08:02:40 +01:00
invoiceninja/resources/views/accounts/product.blade.php

77 lines
2.2 KiB
PHP
Raw Normal View History

2015-10-14 16:15:39 +02:00
@extends('header')
2015-03-16 22:45:25 +01:00
2016-09-23 16:00:47 +02:00
@section('content')
2017-11-03 09:19:03 +01:00
@parent
2015-03-16 22:45:25 +01:00
2017-11-03 09:19:03 +01:00
{!! Former::open($url)
->method($method)
2018-03-14 12:03:30 +01:00
->autocomplete('off')
2017-11-03 09:19:03 +01:00
->rules(['product_key' => 'required|max:255'])
2017-11-30 20:17:50 +01:00
->addClass('col-lg-10 col-lg-offset-1 main-form warn-on-exit') !!}
2017-11-03 10:25:14 +01:00
@if ($product)
{{ Former::populate($product) }}
{{ Former::populateField('cost', Utils::roundSignificant($product->cost)) }}
@endif
<span style="display:none">
{!! Former::text('public_id') !!}
{!! Former::text('action') !!}
</span>
2015-03-16 22:45:25 +01:00
2017-12-08 12:57:46 +01:00
<div class="row">
<div class="col-lg-10 col-lg-offset-1">
<div class="panel panel-default">
<div class="panel-body form-padding-right">
2015-03-16 22:45:25 +01:00
2017-12-08 12:57:46 +01:00
{!! Former::text('product_key')->label('texts.product') !!}
{!! Former::textarea('notes')->rows(6) !!}
2015-03-16 22:45:25 +01:00
2018-04-04 21:08:37 +02:00
@include('partials/custom_fields', ['entityType' => ENTITY_PRODUCT])
2017-02-23 15:33:02 +01:00
2017-12-08 12:57:46 +01:00
{!! Former::text('cost') !!}
2017-02-23 15:33:02 +01:00
2017-12-08 12:57:46 +01:00
@if ($account->invoice_item_taxes)
@include('partials.tax_rates')
@endif
2015-03-16 22:45:25 +01:00
2017-12-08 12:57:46 +01:00
</div>
</div>
2017-11-03 09:19:03 +01:00
</div>
</div>
2017-11-03 09:19:03 +01:00
<center class="buttons">
{!! Button::normal(trans('texts.cancel'))->large()->asLinkTo(HTMLUtils::previousUrl('/products'))->appendIcon(Icon::create('remove-circle')) !!}
{!! Button::success(trans('texts.save'))->submit()->large()->appendIcon(Icon::create('floppy-disk')) !!}
2017-11-03 10:25:14 +01:00
@if ($product)
{!! DropdownButton::normal(trans('texts.more_actions'))
->withContents($product->present()->moreActions())
->large()
->dropup() !!}
@endif
2017-11-03 09:19:03 +01:00
</center>
2015-04-20 16:34:23 +02:00
2017-11-03 09:19:03 +01:00
{!! Former::close() !!}
2015-03-16 22:45:25 +01:00
2017-11-03 09:19:03 +01:00
<script type="text/javascript">
2015-03-16 22:45:25 +01:00
2017-11-03 10:25:14 +01:00
$(function() {
$('#product_key').focus();
});
function submitAction(action) {
$('#action').val(action);
$('.main-form').submit();
}
function onDeleteClick() {
sweetConfirm(function() {
submitAction('delete');
});
}
2015-03-16 22:45:25 +01:00
2017-11-03 09:19:03 +01:00
</script>
2015-03-16 22:45:25 +01:00
2016-09-23 16:00:47 +02:00
@stop