Invoice logo and Customer profile picture
This commit is contained in:
		@@ -63,11 +63,32 @@
 | 
			
		||||
                text  : '{{ trans('general.form.select.file') }}',
 | 
			
		||||
                style : 'btn-default',
 | 
			
		||||
                @if($user->picture)
 | 
			
		||||
                placeholder : '<?php echo $user->picture; ?>'
 | 
			
		||||
                placeholder : '<?php echo $user->picture->basename; ?>'
 | 
			
		||||
                @else
 | 
			
		||||
                placeholder : '{{ trans('general.form.no_file_selected') }}'
 | 
			
		||||
                @endif
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            @if($user->picture)
 | 
			
		||||
                picture_html  = '<span class="picture">';
 | 
			
		||||
                picture_html += '    <a href="{{ url('uploads/' . $user->picture->id . '/download') }}">';
 | 
			
		||||
                picture_html += '        <span id="download-picture" class="text-primary">';
 | 
			
		||||
                picture_html += '            <i class="fa fa-file-{{ $user->picture->aggregate_type }}-o"></i> {{ $user->picture->basename }}';
 | 
			
		||||
                picture_html += '        </span>';
 | 
			
		||||
                picture_html += '    </a>';
 | 
			
		||||
                picture_html += '    {!! Form::open(['id' => 'picture-' . $user->picture->id, 'method' => 'DELETE', 'url' => [url('uploads/' . $user->picture->id)], 'style' => 'display:inline']) !!}';
 | 
			
		||||
                picture_html += '    <a id="remove-picture" href="javascript:void();">';
 | 
			
		||||
                picture_html += '        <span class="text-danger"><i class="fa fa fa-times"></i></span>';
 | 
			
		||||
                picture_html += '    </a>';
 | 
			
		||||
                picture_html += '    {!! Form::close() !!}';
 | 
			
		||||
                picture_html += '</span>';
 | 
			
		||||
 | 
			
		||||
                $('.fancy-file .fake-file').append(picture_html);
 | 
			
		||||
 | 
			
		||||
                $(document).on('click', '#remove-picture', function (e) {
 | 
			
		||||
                    confirmDelete("#picture-{!! $user->picture->id !!}", "{!! trans('general.attachment') !!}", "{!! trans('general.delete_confirm', ['name' => '<strong>' . $user->picture->basename . '</strong>', 'type' => strtolower(trans('general.attachment'))]) !!}", "{!! trans('general.cancel') !!}", "{!! trans('general.delete')  !!}");
 | 
			
		||||
                });
 | 
			
		||||
            @endif
 | 
			
		||||
        });
 | 
			
		||||
    </script>
 | 
			
		||||
@endpush
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user