]> BookStack Code Mirror - bookstack/blob - resources/views/settings/registration.blade.php
Actually add the test this time
[bookstack] / resources / views / settings / registration.blade.php
1 @extends('settings.layout')
2
3 @section('card')
4     <h1 id="registration" class="list-heading">{{ trans('settings.reg_settings') }}</h1>
5     <form action="{{ url("/settings/registration") }}" method="POST">
6         {!! csrf_field() !!}
7         <input type="hidden" name="section" value="registration">
8
9         <div class="setting-list">
10             <div class="grid half gap-xl">
11                 <div>
12                     <label class="setting-list-label">{{ trans('settings.reg_enable') }}</label>
13                     <p class="small">{!! trans('settings.reg_enable_desc') !!}</p>
14                 </div>
15                 <div>
16                     @include('form.toggle-switch', [
17                         'name' => 'setting-registration-enabled',
18                         'value' => setting('registration-enabled'),
19                         'label' => trans('settings.reg_enable_toggle')
20                     ])
21
22                     @if(in_array(config('auth.method'), ['ldap', 'saml2', 'oidc']))
23                         <div class="text-warn text-small mb-l">{{ trans('settings.reg_enable_external_warning') }}</div>
24                     @endif
25
26                     <label for="setting-registration-role">{{ trans('settings.reg_default_role') }}</label>
27                     <select id="setting-registration-role" name="setting-registration-role"
28                             @if($errors->has('setting-registration-role')) class="neg" @endif>
29                         <option value="0" @if(intval(setting('registration-role', '0')) === 0) selected @endif>
30                             -- {{ trans('common.none') }} --
31                         </option>
32                         @foreach(\BookStack\Users\Models\Role::all() as $role)
33                             <option value="{{$role->id}}"
34                                     data-system-role-name="{{ $role->system_name ?? '' }}"
35                                     @if(intval(setting('registration-role', '0')) === $role->id) selected @endif
36                             >
37                                 {{ $role->display_name }}
38                             </option>
39                         @endforeach
40                     </select>
41                 </div>
42             </div>
43
44             <div class="grid half gap-xl">
45                 <div>
46                     <label for="setting-registration-restrict"
47                            class="setting-list-label">{{ trans('settings.reg_confirm_restrict_domain') }}</label>
48                     <p class="small">{!! trans('settings.reg_confirm_restrict_domain_desc') !!}</p>
49                 </div>
50                 <div class="pt-xs">
51                     <input type="text" id="setting-registration-restrict" name="setting-registration-restrict"
52                            placeholder="{{ trans('settings.reg_confirm_restrict_domain_placeholder') }}"
53                            value="{{ setting('registration-restrict', '') }}">
54                 </div>
55             </div>
56
57             <div class="grid half gap-xl">
58                 <div>
59                     <label class="setting-list-label">{{ trans('settings.reg_email_confirmation') }}</label>
60                     <p class="small">{{ trans('settings.reg_confirm_email_desc') }}</p>
61                 </div>
62                 <div>
63                     @include('form.toggle-switch', [
64                         'name' => 'setting-registration-confirmation',
65                         'value' => setting('registration-confirmation'),
66                         'label' => trans('settings.reg_email_confirmation_toggle')
67                     ])
68                 </div>
69             </div>
70
71         </div>
72
73         <div class="form-group text-right">
74             <button type="submit" class="button">{{ trans('settings.settings_save') }}</button>
75         </div>
76     </form>
77 @endsection