2021-08-22 14:15:58 +02:00
|
|
|
@extends('layouts.simple')
|
2015-08-08 21:05:30 +02:00
|
|
|
|
2019-02-03 14:45:45 +01:00
|
|
|
@section('body')
|
|
|
|
<div class="container small">
|
2019-02-02 16:49:57 +01:00
|
|
|
|
2022-03-26 22:36:05 +01:00
|
|
|
@include('settings.parts.navbar', ['selected' => 'users'])
|
2017-08-26 18:17:04 +02:00
|
|
|
|
2019-08-25 16:44:51 +02:00
|
|
|
<section class="card content-wrap">
|
2021-01-17 14:41:43 +01:00
|
|
|
<h1 class="list-heading">{{ $user->id === user()->id ? trans('settings.users_edit_profile') : trans('settings.users_edit') }}</h1>
|
2019-08-04 15:26:39 +02:00
|
|
|
<form action="{{ url("/settings/users/{$user->id}") }}" method="post" enctype="multipart/form-data">
|
2019-02-03 14:45:45 +01:00
|
|
|
{!! csrf_field() !!}
|
|
|
|
<input type="hidden" name="_method" value="PUT">
|
2015-08-08 21:05:30 +02:00
|
|
|
|
2019-02-03 14:45:45 +01:00
|
|
|
<div class="setting-list">
|
2021-08-22 14:15:58 +02:00
|
|
|
@include('users.parts.form', ['model' => $user, 'authMethod' => $authMethod])
|
2015-12-09 23:30:55 +01:00
|
|
|
|
2019-03-30 15:27:00 +01:00
|
|
|
<div class="grid half gap-xl">
|
2019-02-03 14:45:45 +01:00
|
|
|
<div>
|
2023-09-17 17:20:21 +02:00
|
|
|
<label for="user-avatar"
|
|
|
|
class="setting-list-label">{{ trans('settings.users_avatar') }}</label>
|
2019-02-03 14:45:45 +01:00
|
|
|
<p class="small">{{ trans('settings.users_avatar_desc') }}</p>
|
2017-08-26 18:17:04 +02:00
|
|
|
</div>
|
2019-02-03 14:45:45 +01:00
|
|
|
<div>
|
2021-08-22 14:15:58 +02:00
|
|
|
@include('form.image-picker', [
|
2019-02-03 14:45:45 +01:00
|
|
|
'resizeHeight' => '512',
|
|
|
|
'resizeWidth' => '512',
|
|
|
|
'showRemove' => false,
|
2019-08-04 15:26:39 +02:00
|
|
|
'defaultImage' => url('/user_avatar.png'),
|
2019-02-03 14:45:45 +01:00
|
|
|
'currentImage' => $user->getAvatar(80),
|
|
|
|
'currentId' => $user->image_id,
|
2019-05-04 16:48:15 +02:00
|
|
|
'name' => 'profile_image',
|
2019-02-03 14:45:45 +01:00
|
|
|
'imageClass' => 'avatar large'
|
|
|
|
])
|
2017-08-26 18:17:04 +02:00
|
|
|
</div>
|
2017-03-05 16:34:54 +01:00
|
|
|
</div>
|
2019-02-03 14:45:45 +01:00
|
|
|
|
2023-09-17 17:20:21 +02:00
|
|
|
@include('users.parts.language-option-row', ['value' => old('language') ?? $user->getLocale()->appLocale()])
|
2019-02-03 14:45:45 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="text-right">
|
2023-10-19 11:20:04 +02:00
|
|
|
<a href="{{ url("/settings/users") }}"
|
2023-09-17 17:20:21 +02:00
|
|
|
class="button outline">{{ trans('common.cancel') }}</a>
|
2019-02-03 14:45:45 +01:00
|
|
|
@if($authMethod !== 'system')
|
2023-09-17 17:20:21 +02:00
|
|
|
<a href="{{ url("/settings/users/{$user->id}/delete") }}"
|
|
|
|
class="button outline">{{ trans('settings.users_delete') }}</a>
|
2019-02-03 14:45:45 +01:00
|
|
|
@endif
|
2019-08-25 13:40:04 +02:00
|
|
|
<button class="button" type="submit">{{ trans('common.save') }}</button>
|
2019-02-03 14:45:45 +01:00
|
|
|
</div>
|
|
|
|
</form>
|
2019-08-25 16:44:51 +02:00
|
|
|
</section>
|
2021-07-14 21:06:41 +02:00
|
|
|
|
|
|
|
<section class="card content-wrap auto-height">
|
2021-08-08 15:24:44 +02:00
|
|
|
<h2 class="list-heading">{{ trans('settings.users_mfa') }}</h2>
|
2023-10-17 18:38:07 +02:00
|
|
|
<p class="text-small">{{ trans('settings.users_mfa_desc') }}</p>
|
2021-07-14 21:06:41 +02:00
|
|
|
<div class="grid half gap-xl v-center pb-s">
|
|
|
|
<div>
|
|
|
|
@if ($mfaMethods->count() > 0)
|
|
|
|
<span class="text-pos">@icon('check-circle')</span>
|
|
|
|
@else
|
|
|
|
<span class="text-neg">@icon('cancel')</span>
|
|
|
|
@endif
|
2021-08-08 15:24:44 +02:00
|
|
|
{{ trans_choice('settings.users_mfa_x_methods', $mfaMethods->count()) }}
|
2021-07-14 21:06:41 +02:00
|
|
|
</div>
|
|
|
|
<div class="text-m-right">
|
|
|
|
@if($user->id === user()->id)
|
2023-09-17 17:20:21 +02:00
|
|
|
<a href="{{ url('/mfa/setup') }}"
|
|
|
|
class="button outline">{{ trans('settings.users_mfa_configure') }}</a>
|
2021-07-14 21:06:41 +02:00
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</section>
|
2015-08-29 16:03:42 +02:00
|
|
|
|
2023-10-17 18:38:07 +02:00
|
|
|
@if(count($activeSocialDrivers) > 0)
|
2019-08-25 16:44:51 +02:00
|
|
|
<section class="card content-wrap auto-height">
|
2023-10-17 18:38:07 +02:00
|
|
|
<div class="flex-container-row items-center justify-space-between wrap">
|
|
|
|
<h2 class="list-heading">{{ trans('settings.users_social_accounts') }}</h2>
|
|
|
|
<div>
|
|
|
|
@if(user()->id === $user->id)
|
|
|
|
<a class="button outline" href="{{ url('/my-account/auth#social-accounts') }}">{{ trans('common.manage') }}</a>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<p class="text-muted text-small">{{ trans('settings.users_social_accounts_desc') }}</p>
|
2019-02-03 14:45:45 +01:00
|
|
|
<div class="container">
|
|
|
|
<div class="grid third">
|
2023-10-17 18:38:07 +02:00
|
|
|
@foreach($activeSocialDrivers as $driver => $driverName)
|
2019-02-03 14:45:45 +01:00
|
|
|
<div class="text-center mb-m">
|
2019-08-25 16:44:51 +02:00
|
|
|
<div role="presentation">@icon('auth/'. $driver, ['style' => 'width: 56px;height: 56px;'])</div>
|
2023-10-17 18:38:07 +02:00
|
|
|
<p class="my-none bold">{{ $driverName }}</p>
|
|
|
|
@if($user->hasSocialAccount($driver))
|
2023-10-19 15:18:42 +02:00
|
|
|
<p class="text-pos bold text-small my-none">{{ trans('settings.users_social_status_connected') }}</p>
|
2023-10-17 18:38:07 +02:00
|
|
|
@else
|
2023-10-19 15:18:42 +02:00
|
|
|
<p class="text-neg bold text-small my-none">{{ trans('settings.users_social_status_disconnected') }}</p>
|
2023-10-17 18:38:07 +02:00
|
|
|
@endif
|
2019-02-03 14:45:45 +01:00
|
|
|
</div>
|
|
|
|
@endforeach
|
2015-09-04 21:40:36 +02:00
|
|
|
</div>
|
2017-08-26 18:17:04 +02:00
|
|
|
</div>
|
2019-08-25 16:44:51 +02:00
|
|
|
</section>
|
2015-09-04 21:40:36 +02:00
|
|
|
@endif
|
2019-12-29 14:02:26 +01:00
|
|
|
|
2023-10-19 12:31:45 +02:00
|
|
|
@include('users.api-tokens.parts.list', ['user' => $user, 'context' => 'settings'])
|
2015-08-08 21:05:30 +02:00
|
|
|
</div>
|
|
|
|
|
2019-03-10 22:40:02 +01:00
|
|
|
@stop
|