]> BookStack Code Mirror - bookstack/blob - resources/views/users/edit.blade.php
My Account: Updated and started adding to tests
[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                     @include('users.parts.language-option-row', ['value' => old('language') ?? $user->getLocale()->appLocale()])
38                 </div>
39
40                 <div class="text-right">
41                     <a href="{{  url("/settings/users") }}"
42                        class="button outline">{{ trans('common.cancel') }}</a>
43                     @if($authMethod !== 'system')
44                         <a href="{{ url("/settings/users/{$user->id}/delete") }}"
45                            class="button outline">{{ trans('settings.users_delete') }}</a>
46                     @endif
47                     <button class="button" type="submit">{{ trans('common.save') }}</button>
48                 </div>
49             </form>
50         </section>
51
52         <section class="card content-wrap auto-height">
53             <h2 class="list-heading">{{ trans('settings.users_mfa') }}</h2>
54             <p class="text-small">{{ trans('settings.users_mfa_desc') }}</p>
55             <div class="grid half gap-xl v-center pb-s">
56                 <div>
57                     @if ($mfaMethods->count() > 0)
58                         <span class="text-pos">@icon('check-circle')</span>
59                     @else
60                         <span class="text-neg">@icon('cancel')</span>
61                     @endif
62                     {{ trans_choice('settings.users_mfa_x_methods', $mfaMethods->count()) }}
63                 </div>
64                 <div class="text-m-right">
65                     @if($user->id === user()->id)
66                         <a href="{{ url('/mfa/setup')  }}"
67                            class="button outline">{{ trans('settings.users_mfa_configure') }}</a>
68                     @endif
69                 </div>
70             </div>
71
72         </section>
73
74         @if(count($activeSocialDrivers) > 0)
75             <section class="card content-wrap auto-height">
76                 <div class="flex-container-row items-center justify-space-between wrap">
77                     <h2 class="list-heading">{{ trans('settings.users_social_accounts') }}</h2>
78                     <div>
79                         @if(user()->id === $user->id)
80                             <a class="button outline" href="{{ url('/my-account/auth#social-accounts') }}">{{ trans('common.manage') }}</a>
81                         @endif
82                     </div>
83                 </div>
84                 <p class="text-muted text-small">{{ trans('settings.users_social_accounts_desc') }}</p>
85                 <div class="container">
86                     <div class="grid third">
87                         @foreach($activeSocialDrivers as $driver => $driverName)
88                             <div class="text-center mb-m">
89                                 <div role="presentation">@icon('auth/'. $driver, ['style' => 'width: 56px;height: 56px;'])</div>
90                                 <p class="my-none bold">{{ $driverName }}</p>
91                                 @if($user->hasSocialAccount($driver))
92                                     <p class="text-pos bold text-small my-none">{{ trans('settings.users_social_status_connected') }}</p>
93                                 @else
94                                     <p class="text-neg bold text-small my-none">{{ trans('settings.users_social_status_disconnected') }}</p>
95                                 @endif
96                             </div>
97                         @endforeach
98                     </div>
99                 </div>
100             </section>
101         @endif
102
103         @include('users.api-tokens.parts.list', ['user' => $user, 'context' => 'settings'])
104     </div>
105
106 @stop