invoiceninja/app/views/credits/edit.blade.php

65 lines
1.6 KiB
PHP
Raw Normal View History

2013-12-05 17:23:24 +02:00
@extends('header')
@section('onReady')
$('input#name').focus();
@stop
@section('content')
{{ Former::open($url)->addClass('col-md-10 col-md-offset-1 warn-on-exit')->method($method)->rules(array(
2014-07-23 18:02:56 +03:00
'client' => 'required',
2013-12-08 15:32:49 +02:00
'amount' => 'required',
2013-12-05 17:23:24 +02:00
)); }}
<div class="row">
<div class="col-md-8">
2013-12-30 22:17:45 +02:00
{{ Former::select('client')->addOption('', '')->addGroupClass('client-select') }}
2013-12-05 17:23:24 +02:00
{{ Former::text('amount') }}
2014-02-17 18:25:38 +02:00
{{ Former::text('credit_date')->data_date_format(Session::get(SESSION_DATE_PICKER_FORMAT))->append('<i class="glyphicon glyphicon-calendar"></i>') }}
2014-04-01 13:30:43 +03:00
{{-- Former::select('currency_id')->addOption('','')
2014-01-15 14:01:24 +00:00
->fromQuery($currencies, 'name', 'id')->select(Session::get(SESSION_CURRENCY, DEFAULT_CURRENCY)) --}}
{{ Former::textarea('private_notes') }}
2013-12-05 17:23:24 +02:00
</div>
<div class="col-md-6">
</div>
</div>
<center class="buttons">
2014-04-01 13:30:43 +03:00
{{ Button::lg_primary_submit_success(trans('texts.save'))->append_with_icon('floppy-disk') }}
{{ Button::lg_default_link('credits/' . ($credit ? $credit->public_id : ''), trans('texts.cancel'))->append_with_icon('remove-circle'); }}
2013-12-05 17:23:24 +02:00
</center>
{{ Former::close() }}
<script type="text/javascript">
2014-01-02 10:27:48 +02:00
2013-12-30 22:17:45 +02:00
var clients = {{ $clients }};
2013-12-05 17:23:24 +02:00
$(function() {
2014-01-16 21:12:46 +00:00
var $clientSelect = $('select#client');
for (var i=0; i<clients.length; i++) {
var client = clients[i];
$clientSelect.append(new Option(getClientDisplayName(client), client.public_id));
}
if ({{ $clientPublicId ? 'true' : 'false' }}) {
$clientSelect.val({{ $clientPublicId }});
}
$clientSelect.combobox();
2013-12-29 19:40:11 +02:00
$('#currency_id').combobox();
2014-06-30 14:42:25 +03:00
$('#credit_date').datepicker('update', new Date());
2013-12-05 17:23:24 +02:00
});
</script>
@stop