Attachment file update
This commit is contained in:
		@@ -180,8 +180,23 @@
 | 
			
		||||
                    </div>
 | 
			
		||||
 | 
			
		||||
                    @if($invoice->attachment)
 | 
			
		||||
                        <span>
 | 
			
		||||
                            <a href=""><i class="fa fa-file-{{ $invoice->attachment->aggregate_type }}-o"></i> {{ $invoice->attachment->basename }}</a> <i class="fa fa fa-times"></i>
 | 
			
		||||
                        <span class="attachment">
 | 
			
		||||
                            <a href="{{ url('uploads/invoices/' . $invoice->attachment->basename . '/download') }}">
 | 
			
		||||
                                <span id="download-attachment" class="text-primary">
 | 
			
		||||
                                    <i class="fa fa-file-{{ $invoice->attachment->aggregate_type }}-o"></i> {{ $invoice->attachment->basename }}
 | 
			
		||||
                                </span>
 | 
			
		||||
                            </a>
 | 
			
		||||
                            {!! Form::open([
 | 
			
		||||
                                'id' => 'attachment-' . $invoice->attachment->id,
 | 
			
		||||
                                'method' => 'DELETE',
 | 
			
		||||
                                'url' => [url('uploads/invoices/' . $invoice->attachment->id)],
 | 
			
		||||
                                'style' => 'display:inline'
 | 
			
		||||
                            ]) !!}
 | 
			
		||||
                            {{ Form::hidden('id', $invoice->id) }}
 | 
			
		||||
                            <a id="remove-attachment" href="javascript:void();">
 | 
			
		||||
                                <span class="text-danger"><i class="fa fa fa-times"></i></span>
 | 
			
		||||
                            </a>
 | 
			
		||||
                            {!! Form::close() !!}
 | 
			
		||||
                        </span>
 | 
			
		||||
                    @endif
 | 
			
		||||
                </div>
 | 
			
		||||
@@ -420,6 +435,11 @@
 | 
			
		||||
 | 
			
		||||
                $('#email-modal').modal('show');
 | 
			
		||||
            });
 | 
			
		||||
            @if($invoice->attachment)
 | 
			
		||||
            $(document).on('click', '#remove-attachment', function (e) {
 | 
			
		||||
                confirmDelete("#attachment-{!! $invoice->attachment->id !!}", "{!! trans('general.attachment') !!}", "{!! trans('general.delete_confirm', ['name' => '<strong>' . $invoice->attachment->basename . '</strong>', 'type' => strtolower(trans('general.attachment'))]) !!}", "{!! trans('general.cancel') !!}", "{!! trans('general.delete')  !!}");
 | 
			
		||||
            });
 | 
			
		||||
            @endif
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        function addPayment() {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user