1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 14:42:42 +01:00
invoiceninja/app/views/payments/edit.blade.php

78 lines
1.7 KiB
PHP
Raw Normal View History

2013-12-04 17:20:14 +01:00
@extends('header')
@section('onReady')
$('input#name').focus();
@stop
@section('content')
{{ Former::open($url)->addClass('col-md-10 col-md-offset-1 main_form')->method($method)->rules(array(
2013-12-08 14:32:49 +01:00
'client' => 'required',
2013-12-30 21:17:45 +01:00
'invoice' => 'required',
2013-12-08 14:32:49 +01:00
'amount' => 'required',
2013-12-04 17:20:14 +01:00
)); }}
@if ($payment)
2013-12-05 16:23:24 +01:00
{{-- Former::populate($payment) --}}
2013-12-30 21:17:45 +01:00
@else
2014-01-01 00:50:13 +01:00
{{ Former::populateField('payment_date', Utils::today()) }}
2013-12-04 17:20:14 +01:00
@endif
<div class="row">
2013-12-05 16:23:24 +01:00
<div class="col-md-8">
2013-12-04 17:20:14 +01:00
@if ($payment)
{{ Former::legend('Edit Payment') }}
@else
{{ Former::legend('New Payment') }}
@endif
2013-12-05 16:23:24 +01:00
{{ Former::select('client')->addOption('', '')->addGroupClass('client-select') }}
{{ Former::select('invoice')->addOption('', '')->addGroupClass('invoice-select') }}
{{ Former::text('amount') }}
2014-01-01 00:50:13 +01:00
{{ Former::text('payment_date')->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT)) }}
2013-12-30 21:17:45 +01:00
{{ Former::select('currency_id')->addOption('','')->label('Currency')
->fromQuery($currencies, 'name', 'id')->select(Session::get(SESSION_CURRENCY, DEFAULT_CURRENCY)) }}
2013-12-04 17:20:14 +01:00
</div>
<div class="col-md-6">
</div>
</div>
<center style="margin-top:16px">
{{ Button::lg_primary_submit('Save') }} &nbsp;|&nbsp;
{{ link_to('payments/' . ($payment ? $payment->public_id : ''), 'Cancel') }}
</center>
{{ Former::close() }}
2013-12-05 16:23:24 +01:00
<script type="text/javascript">
var invoices = {{ $invoices }};
var clients = {{ $clients }};
$(function() {
2013-12-30 21:17:45 +01:00
@if ($clientPublicId)
$('select#client').val({{ $clientPublicId }});
2013-12-09 10:38:49 +01:00
@endif
2014-01-02 09:27:48 +01:00
populateInvoiceComboboxes();
2013-12-05 16:23:24 +01:00
2013-12-29 18:40:11 +01:00
$('#currency_id').combobox();
2013-12-05 16:23:24 +01:00
$('#payment_date').datepicker({
autoclose: true,
2014-01-01 00:50:13 +01:00
todayHighlight: true,
keyboardNavigation: false
2013-12-05 16:23:24 +01:00
});
});
</script>
@stop