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

81 lines
2.4 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)
->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-11-03 09:19:03 +01:00
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{!! $title !!}</h3>
</div>
<div class="panel-body form-padding-right">
2015-03-16 22:45:25 +01:00
2017-11-03 09:19:03 +01:00
{!! Former::text('product_key')->label('texts.product') !!}
{!! Former::textarea('notes')->rows(6) !!}
2015-03-16 22:45:25 +01:00
2017-11-03 09:19:03 +01:00
@if ($account->hasFeature(FEATURE_INVOICE_SETTINGS))
@if ($account->custom_invoice_item_label1)
{!! Former::text('custom_value1')->label(e($account->custom_invoice_item_label1)) !!}
@endif
@if ($account->custom_invoice_item_label2)
{!! Former::text('custom_value2')->label(e($account->custom_invoice_item_label2)) !!}
@endif
@endif
2017-02-23 15:33:02 +01:00
2017-11-03 09:19:03 +01:00
{!! Former::text('cost') !!}
2017-02-23 15:33:02 +01:00
2017-11-03 09:19:03 +01:00
@if ($account->invoice_item_taxes)
@include('partials.tax_rates')
@endif
2015-03-16 22:45:25 +01:00
2017-11-03 09:19:03 +01:00
</div>
</div>
2015-10-21 13:11:08 +02:00
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