1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00
invoiceninja/resources/views/payments/edit.blade.php

74 lines
1.9 KiB
PHP
Raw Normal View History

2015-03-16 22:45:25 +01:00
@extends('header')
@section('onReady')
$('input#name').focus();
@stop
@section('content')
2015-03-31 19:42:37 +02:00
{!! Former::open($url)->addClass('col-md-10 col-md-offset-1 warn-on-exit')->method($method)->rules(array(
2015-03-16 22:45:25 +01:00
'client' => 'required',
'invoice' => 'required',
'amount' => 'required',
2015-03-31 19:42:37 +02:00
)) !!}
2015-03-16 22:45:25 +01:00
@if ($payment)
2015-04-06 02:28:43 +02:00
{!! Former::populate($payment) !!}
2015-03-16 22:45:25 +01:00
@endif
2015-04-20 16:34:23 +02:00
2015-03-16 22:45:25 +01:00
<div class="row">
2015-04-20 16:34:23 +02:00
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-body">
2015-03-16 22:45:25 +01:00
@if (!$payment)
2015-03-31 19:42:37 +02:00
{!! Former::select('client')->addOption('', '')->addGroupClass('client-select') !!}
{!! Former::select('invoice')->addOption('', '')->addGroupClass('invoice-select') !!}
{!! Former::text('amount') !!}
2015-03-16 22:45:25 +01:00
@endif
2015-03-31 19:42:37 +02:00
{!! Former::select('payment_type_id')->addOption('','')
->fromQuery($paymentTypes, 'name', 'id') !!}
{!! Former::text('payment_date')->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))->append('<i class="glyphicon glyphicon-calendar"></i>') !!}
{!! Former::text('transaction_reference') !!}
2015-03-16 22:45:25 +01:00
2015-04-20 16:34:23 +02:00
</div>
</div>
2015-03-16 22:45:25 +01:00
</div>
</div>
2015-04-20 16:34:23 +02:00
2015-03-16 22:45:25 +01:00
<center class="buttons">
2015-03-31 19:42:37 +02:00
{!! Button::success(trans('texts.save'))->appendIcon(Icon::create('floppy-disk'))->submit()->large() !!}
{!! Button::withValue(trans('texts.cancel'))->appendIcon(Icon::create('remove-circle'))->asLinkTo('/payments')->large() !!}
2015-03-16 22:45:25 +01:00
</center>
2015-03-31 19:42:37 +02:00
{!! Former::close() !!}
2015-03-16 22:45:25 +01:00
<script type="text/javascript">
2015-03-31 19:42:37 +02:00
var invoices = {!! $invoices !!};
var clients = {!! $clients !!};
2015-03-16 22:45:25 +01:00
$(function() {
@if ($payment)
$('#payment_date').datepicker('update', '{{ $payment->payment_date }}')
@else
$('#payment_date').datepicker('update', new Date());
populateInvoiceComboboxes({{ $clientPublicId }}, {{ $invoicePublicId }});
@endif
$('#payment_type_id').combobox();
});
</script>
@stop