Add edit page attachment
This commit is contained in:
@ -208,6 +208,24 @@
|
||||
@endif
|
||||
});
|
||||
|
||||
@if($invoice->attachment)
|
||||
attachment_html = '<span class="attachment">';
|
||||
attachment_html += ' <a href="{{ url('uploads/' . $invoice->attachment->id . '/download') }}">';
|
||||
attachment_html += ' <span id="download-attachment" class="text-primary">';
|
||||
attachment_html += ' <i class="fa fa-file-{{ $invoice->attachment->aggregate_type }}-o"></i> {{ $invoice->attachment->basename }}';
|
||||
attachment_html += ' </span>';
|
||||
attachment_html += ' </a>';
|
||||
attachment_html += ' {!! Form::open(['id' => 'attachment-' . $invoice->attachment->id, 'method' => 'DELETE', 'url' => [url('uploads/' . $invoice->attachment->id)], 'style' => 'display:inline']) !!}';
|
||||
attachment_html += ' {{ Form::hidden('id', $invoice->id) }}';
|
||||
attachment_html += ' <a id="remove-attachment" href="javascript:void();">';
|
||||
attachment_html += ' <span class="text-danger"><i class="fa fa fa-times"></i></span>';
|
||||
attachment_html += ' </a>';
|
||||
attachment_html += ' {!! Form::close() !!}';
|
||||
attachment_html += '</span>';
|
||||
|
||||
$('.fancy-file .fake-file').append(attachment_html);
|
||||
@endif
|
||||
|
||||
var autocomplete_path = "{{ url('items/items/autocomplete') }}";
|
||||
|
||||
$(document).on('click', '.form-control.typeahead', function() {
|
||||
|
Reference in New Issue
Block a user