close #319 Fixed: Users and profile aren't working when using Gravatar
This commit is contained in:
		@@ -18,7 +18,19 @@
 | 
			
		||||
 | 
			
		||||
            {{ Form::selectGroup('locale', trans_choice('general.languages', 1), 'flag', language()->allowed(), setting('general.default_locale')) }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::fileGroup('picture',  trans_choice('general.pictures', 1)) }}
 | 
			
		||||
            @if (setting('general.use_gravatar', '0') == '1')
 | 
			
		||||
                {{ Form::hidden('picture',  trans_choice('general.pictures', 1)) }}
 | 
			
		||||
                <div class="form-group col-md-6">
 | 
			
		||||
                    {!! Form::label('picture', trans_choice('general.pictures', 1), ['class' => 'control-label']) !!}
 | 
			
		||||
                    <div class="input-group">
 | 
			
		||||
                        <div class="input-group-addon"><i class="fa fa-picture-o"></i></div>
 | 
			
		||||
                        {!! Form::text('fake_picture', null, ['id' => 'fake_picture', 'class' => 'form-control', 'disabled' => 'disabled', 'placeholder' => trans('settings.appearance.use_gravatar')]) !!}
 | 
			
		||||
                        {!! Form::hidden('picture', null, ['id' => 'picture', 'class' => 'form-control']) !!}
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
            @else
 | 
			
		||||
                {{ Form::fileGroup('picture',  trans_choice('general.pictures', 1)) }}
 | 
			
		||||
            @endif
 | 
			
		||||
 | 
			
		||||
            @permission('read-companies-companies')
 | 
			
		||||
            {{ Form::checkboxGroup('companies', trans_choice('general.companies', 2), $companies, 'company_name') }}
 | 
			
		||||
@@ -60,11 +72,13 @@
 | 
			
		||||
                placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.languages', 1)]) }}"
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            @if (setting('general.use_gravatar', '0') != '1')
 | 
			
		||||
            $('#picture').fancyfile({
 | 
			
		||||
                text  : '{{ trans('general.form.select.file') }}',
 | 
			
		||||
                style : 'btn-default',
 | 
			
		||||
                placeholder : '{{ trans('general.form.no_file_selected') }}'
 | 
			
		||||
            });
 | 
			
		||||
            @endif
 | 
			
		||||
 | 
			
		||||
            $('input[type=checkbox]').iCheck({
 | 
			
		||||
                checkboxClass: 'icheckbox_square-green',
 | 
			
		||||
 
 | 
			
		||||
@@ -23,7 +23,18 @@
 | 
			
		||||
 | 
			
		||||
            {{ Form::selectGroup('locale', trans_choice('general.languages', 1), 'flag', language()->allowed()) }}
 | 
			
		||||
 | 
			
		||||
            {{ Form::fileGroup('picture',  trans_choice('general.pictures', 1)) }}
 | 
			
		||||
            @if (setting('general.use_gravatar', '0') == '1')
 | 
			
		||||
            <div class="form-group col-md-6">
 | 
			
		||||
                {!! Form::label('picture', trans_choice('general.pictures', 1), ['class' => 'control-label']) !!}
 | 
			
		||||
                <div class="input-group">
 | 
			
		||||
                    <div class="input-group-addon"><i class="fa fa-picture-o"></i></div>
 | 
			
		||||
                    {!! Form::text('fake_picture', null, ['id' => 'fake_picture', 'class' => 'form-control', 'disabled' => 'disabled', 'placeholder' => trans('settings.appearance.use_gravatar')]) !!}
 | 
			
		||||
                    {!! Form::hidden('picture', null, ['id' => 'picture', 'class' => 'form-control']) !!}
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
            @else
 | 
			
		||||
                {{ Form::fileGroup('picture',  trans_choice('general.pictures', 1)) }}
 | 
			
		||||
            @endif
 | 
			
		||||
 | 
			
		||||
            @permission('read-companies-companies')
 | 
			
		||||
            {{ Form::checkboxGroup('companies', trans_choice('general.companies', 2), $companies, 'company_name') }}
 | 
			
		||||
@@ -68,6 +79,7 @@
 | 
			
		||||
                placeholder: "{{ trans('general.form.select.field', ['field' => trans_choice('general.languages', 1)]) }}"
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            @if (setting('general.use_gravatar', '0') != '1')
 | 
			
		||||
            $('#picture').fancyfile({
 | 
			
		||||
                text  : '{{ trans('general.form.select.file') }}',
 | 
			
		||||
                style : 'btn-default',
 | 
			
		||||
@@ -98,6 +110,7 @@
 | 
			
		||||
                    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
 | 
			
		||||
            @endif
 | 
			
		||||
 | 
			
		||||
            $('input[type=checkbox]').iCheck({
 | 
			
		||||
                checkboxClass: 'icheckbox_square-green',
 | 
			
		||||
 
 | 
			
		||||
@@ -43,8 +43,12 @@
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td>
 | 
			
		||||
                            <a href="{{ url('auth/users/' . $item->id . '/edit') }}">
 | 
			
		||||
                                @if (setting('general.use_gravatar', '0') == '1')
 | 
			
		||||
                                    <img src="{{ $item->picture }}" class="users-image" alt="{{ $item->name }}" title="{{ $item->name }}">
 | 
			
		||||
                                @else
 | 
			
		||||
                                @if ($item->picture)
 | 
			
		||||
                                <img src="{{ Storage::url($item->picture->id) }}" class="users-image" alt="{{ $item->name }}" title="{{ $item->name }}">
 | 
			
		||||
                                    <img src="{{ Storage::url($item->picture->id) }}" class="users-image" alt="{{ $item->name }}" title="{{ $item->name }}">
 | 
			
		||||
                                @endif
 | 
			
		||||
                                @endif
 | 
			
		||||
                                {{ $item->name }}
 | 
			
		||||
                            </a>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user