]> BookStack Code Mirror - bookstack/blob - resources/views/users/edit.blade.php
Tests: Updated comment test to account for new editor usage
[bookstack] / resources / views / users / edit.blade.php
1 @extends('layouts.simple')
2
3 @section('body')
4     <div class="container small">
5
6         @include('settings.parts.navbar', ['selected' => 'users'])
7
8         <section class="card content-wrap">
9             <h1 class="list-heading">{{ $user->id === user()->id ? trans('settings.users_edit_profile') : trans('settings.users_edit') }}</h1>
10             <form action="{{ url("/settings/users/{$user->id}") }}" method="post" enctype="multipart/form-data">
11                 {!! csrf_field() !!}
12                 <input type="hidden" name="_method" value="PUT">
13
14                 <div class="setting-list">
15                     @include('users.parts.form', ['model' => $user, 'authMethod' => $authMethod])
16
17                     <div class="grid half gap-xl">
18                         <div>
19                             <label for="user-avatar"
20                                    class="setting-list-label">{{ trans('settings.users_avatar') }}</label>
21                             <p class="small">{{ trans('settings.users_avatar_desc') }}</p>
22                         </div>
23                         <div>
24                             @include('form.image-picker', [
25                                 'resizeHeight' => '512',
26                                 'resizeWidth' => '512',
27                                 'showRemove' => false,
28                                 'defaultImage' => url('/user_avatar.png'),
29                                 'currentImage' => $user->getAvatar(80),
30                                 'currentId' => $user->image_id,
31                                 'name' => 'profile_image',
32                                 'imageClass' => 'avatar large'
33                             ])
34                         </div>
35                     </div>
36
37                     @if(!$user->isGuest())
38                         @include('users.parts.language-option-row', ['value' => old('language') ?? $user->getLocale()->appLocale()])
39                     @endif
40                 </div>
41
42                 <div class="text-right">
43                     <a href="{{  url("/settings/users") }}"
44                        class="button outline">{{ trans('common.cancel') }}</a>
45                     @if($authMethod !== 'system')
46                         <a href="{{ url("/settings/users/{$user->id}/delete") }}"
47                            class="button outline">{{ trans('settings.users_delete') }}</a>
48                     @endif
49                     <button class="button" type="submit">{{ trans('common.save') }}</button>
50                 </div>
51             </form>
52         </section>
53
54         <section class="card content-wrap auto-height">
55             <h2 class="list-heading">{{ trans('settings.users_mfa') }}</h2>
56             <p class="text-small">{{ trans('settings.users_mfa_desc') }}</p>
57             <div class="grid half gap-xl v-center pb-s">
58                 <div>
59                     @if ($mfaMethods->count() > 0)
60                         <span class="text-pos">@icon('check-circle')</span>
61                     @else
62                         <span class="text-neg">@icon('cancel')</span>
63                     @endif
64                     {{ trans_choice('settings.users_mfa_x_methods', $mfaMethods->count()) }}
65                 </div>
66                 <div class="text-m-right">
67                     @if($user->id === user()->id)
68                         <a href="{{ url('/mfa/setup')  }}"
69                            class="button outline">{{ trans('settings.users_mfa_configure') }}</a>
70                     @endif
71                 </div>
72             </div>
73
74         </section>
75
76         @if(count($activeSocialDrivers) > 0)
77             <section class="card content-wrap auto-height">
78                 <div class="flex-container-row items-center justify-space-between wrap">
79                     <h2 class="list-heading">{{ trans('settings.users_social_accounts') }}</h2>
80                     <div>
81                         @if(user()->id === $user->id)
82                             <a class="button outline" href="{{ url('/my-account/auth#social-accounts') }}">{{ trans('common.manage') }}</a>
83                         @endif
84                     </div>
85                 </div>
86                 <p class="text-muted text-small">{{ trans('settings.users_social_accounts_desc') }}</p>
87                 <div class="container">
88                     <div class="grid third">
89                         @foreach($activeSocialDrivers as $driver => $driverName)
90                             <div class="text-center mb-m">
91                                 <div role="presentation">@icon('auth/'. $driver, ['style' => 'width: 56px;height: 56px;'])</div>
92                                 <p class="my-none bold">{{ $driverName }}</p>
93                                 @if($user->hasSocialAccount($driver))
94                                     <p class="text-pos bold text-small my-none">{{ trans('settings.users_social_status_connected') }}</p>
95                                 @else
96                                     <p class="text-neg bold text-small my-none">{{ trans('settings.users_social_status_disconnected') }}</p>
97                                 @endif
98                             </div>
99                         @endforeach
100                     </div>
101                 </div>
102             </section>
103         @endif
104
105         @include('users.api-tokens.parts.list', ['user' => $user, 'context' => 'settings'])
106     </div>
107
108 @stop