1 @extends('layouts.simple')
4 <div class="container medium">
6 @include('settings.parts.navbar', ['selected' => 'settings'])
8 <div class="grid gap-xxl right-focus">
12 <div class="active-link-list in-sidebar">
13 <a href="#" class=" active">@icon('star') Features & Security</a>
14 <a href="#">@icon('palette') Customization</a>
15 <a href="#">@icon('lock') Registration</a>
20 <a target="_blank" rel="noopener noreferrer" href="https://github.com/BookStackApp/BookStack/releases">
21 BookStack @if(strpos($version, 'v') !== 0) version @endif {{ $version }}
27 <div class="card content-wrap auto-height">
28 <h2 id="features" class="list-heading">{{ trans('settings.app_features_security') }}</h2>
29 <form action="{{ url("/settings") }}" method="POST">
31 <input type="hidden" name="section" value="features">
33 <div class="setting-list">
36 <div class="grid half gap-xl">
38 <label for="setting-app-public" class="setting-list-label">{{ trans('settings.app_public_access') }}</label>
39 <p class="small">{!! trans('settings.app_public_access_desc') !!}</p>
40 @if(userCan('users-manage'))
41 <p class="small mb-none">
42 <a href="{{ url($guestUser->getEditUrl()) }}">{!! trans('settings.app_public_access_desc_guest') !!}</a>
47 @include('form.toggle-switch', [
48 'name' => 'setting-app-public',
49 'value' => setting('app-public'),
50 'label' => trans('settings.app_public_access_toggle'),
55 <div class="grid half gap-xl">
57 <label class="setting-list-label">{{ trans('settings.app_secure_images') }}</label>
58 <p class="small">{{ trans('settings.app_secure_images_desc') }}</p>
61 @include('form.toggle-switch', [
62 'name' => 'setting-app-secure-images',
63 'value' => setting('app-secure-images'),
64 'label' => trans('settings.app_secure_images_toggle'),
69 <div class="grid half gap-xl">
71 <label class="setting-list-label">{{ trans('settings.app_disable_comments') }}</label>
72 <p class="small">{!! trans('settings.app_disable_comments_desc') !!}</p>
75 @include('form.toggle-switch', [
76 'name' => 'setting-app-disable-comments',
77 'value' => setting('app-disable-comments'),
78 'label' => trans('settings.app_disable_comments_toggle'),
86 <div class="form-group text-right">
87 <button type="submit" class="button">{{ trans('settings.settings_save') }}</button>
92 <div class="card content-wrap auto-height">
93 <h2 id="customization" class="list-heading">{{ trans('settings.app_customization') }}</h2>
94 <form action="{{ url("/settings") }}" method="POST" enctype="multipart/form-data">
96 <input type="hidden" name="section" value="customization">
98 <div class="setting-list">
100 <div class="grid half gap-xl">
102 <label for="setting-app-name" class="setting-list-label">{{ trans('settings.app_name') }}</label>
103 <p class="small">{{ trans('settings.app_name_desc') }}</p>
106 <input type="text" value="{{ setting('app-name', 'BookStack') }}" name="setting-app-name" id="setting-app-name">
107 @include('form.toggle-switch', [
108 'name' => 'setting-app-name-header',
109 'value' => setting('app-name-header'),
110 'label' => trans('settings.app_name_header'),
115 <div class="grid half gap-xl">
117 <label class="setting-list-label">{{ trans('settings.app_editor') }}</label>
118 <p class="small">{{ trans('settings.app_editor_desc') }}</p>
121 <select name="setting-app-editor" id="setting-app-editor">
122 <option @if(setting('app-editor') === 'wysiwyg') selected @endif value="wysiwyg">WYSIWYG</option>
123 <option @if(setting('app-editor') === 'markdown') selected @endif value="markdown">Markdown</option>
128 <div class="grid half gap-xl">
130 <label class="setting-list-label">{{ trans('settings.app_logo') }}</label>
131 <p class="small">{!! trans('settings.app_logo_desc') !!}</p>
134 @include('form.image-picker', [
135 'removeName' => 'setting-app-logo',
136 'removeValue' => 'none',
137 'defaultImage' => url('/logo.png'),
138 'currentImage' => setting('app-logo'),
139 'name' => 'app_logo',
140 'imageClass' => 'logo-image',
145 <!-- Primary Color -->
146 <div class="grid half gap-xl">
148 <label class="setting-list-label">{{ trans('settings.app_primary_color') }}</label>
149 <p class="small">{!! trans('settings.app_primary_color_desc') !!}</p>
151 <div setting-app-color-picker class="text-m-right pt-xs">
152 <input type="color" data-default="#206ea7" data-current="{{ setting('app-color') }}" value="{{ setting('app-color') }}" name="setting-app-color" id="setting-app-color" placeholder="#206ea7">
153 <input type="hidden" value="{{ setting('app-color-light') }}" name="setting-app-color-light" id="setting-app-color-light">
155 <button type="button" class="text-button text-muted mt-s" setting-app-color-picker-default>{{ trans('common.default') }}</button>
156 <span class="sep">|</span>
157 <button type="button" class="text-button text-muted mt-s" setting-app-color-picker-reset>{{ trans('common.reset') }}</button>
163 <!-- Entity Color -->
166 <label class="setting-list-label">{{ trans('settings.content_colors') }}</label>
167 <p class="small">{!! trans('settings.content_colors_desc') !!}</p>
169 <div class="grid half pt-m">
171 @include('settings.parts.setting-entity-color-picker', ['type' => 'bookshelf'])
172 @include('settings.parts.setting-entity-color-picker', ['type' => 'book'])
173 @include('settings.parts.setting-entity-color-picker', ['type' => 'chapter'])
176 @include('settings.parts.setting-entity-color-picker', ['type' => 'page'])
177 @include('settings.parts.setting-entity-color-picker', ['type' => 'page-draft'])
182 <div homepage-control id="homepage-control" class="grid half gap-xl">
184 <label for="setting-app-homepage" class="setting-list-label">{{ trans('settings.app_homepage') }}</label>
185 <p class="small">{{ trans('settings.app_homepage_desc') }}</p>
188 <select name="setting-app-homepage-type" id="setting-app-homepage-type">
189 <option @if(setting('app-homepage-type') === 'default') selected @endif value="default">{{ trans('common.default') }}</option>
190 <option @if(setting('app-homepage-type') === 'books') selected @endif value="books">{{ trans('entities.books') }}</option>
191 <option @if(setting('app-homepage-type') === 'bookshelves') selected @endif value="bookshelves">{{ trans('entities.shelves') }}</option>
192 <option @if(setting('app-homepage-type') === 'page') selected @endif value="page">{{ trans('entities.pages_specific') }}</option>
195 <div page-picker-container style="display: none;" class="mt-m">
196 @include('settings.parts.page-picker', ['name' => 'setting-app-homepage', 'placeholder' => trans('settings.app_homepage_select'), 'value' => setting('app-homepage')])
202 <label for="setting-app-privacy-link" class="setting-list-label">{{ trans('settings.app_footer_links') }}</label>
203 <p class="small mb-m">{{ trans('settings.app_footer_links_desc') }}</p>
204 @include('settings.parts.footer-links', ['name' => 'setting-app-footer-links', 'value' => setting('app-footer-links', [])])
209 <label for="setting-app-custom-head" class="setting-list-label">{{ trans('settings.app_custom_html') }}</label>
210 <p class="small">{{ trans('settings.app_custom_html_desc') }}</p>
211 <textarea name="setting-app-custom-head" id="setting-app-custom-head" class="simple-code-input mt-m">{{ setting('app-custom-head', '') }}</textarea>
212 <p class="small text-right">{{ trans('settings.app_custom_html_disabled_notice') }}</p>
218 <div class="form-group text-right">
219 <button type="submit" class="button">{{ trans('settings.settings_save') }}</button>
224 <div class="card content-wrap auto-height">
225 <h2 id="registration" class="list-heading">{{ trans('settings.reg_settings') }}</h2>
226 <form action="{{ url("/settings") }}" method="POST">
228 <input type="hidden" name="section" value="registration">
230 <div class="setting-list">
231 <div class="grid half gap-xl">
233 <label class="setting-list-label">{{ trans('settings.reg_enable') }}</label>
234 <p class="small">{!! trans('settings.reg_enable_desc') !!}</p>
237 @include('form.toggle-switch', [
238 'name' => 'setting-registration-enabled',
239 'value' => setting('registration-enabled'),
240 'label' => trans('settings.reg_enable_toggle')
243 @if(in_array(config('auth.method'), ['ldap', 'saml2', 'oidc']))
244 <div class="text-warn text-small mb-l">{{ trans('settings.reg_enable_external_warning') }}</div>
247 <label for="setting-registration-role">{{ trans('settings.reg_default_role') }}</label>
248 <select id="setting-registration-role" name="setting-registration-role" @if($errors->has('setting-registration-role')) class="neg" @endif>
249 <option value="0" @if(intval(setting('registration-role', '0')) === 0) selected @endif>-- {{ trans('common.none') }} --</option>
250 @foreach(\BookStack\Auth\Role::all() as $role)
251 <option value="{{$role->id}}"
252 data-system-role-name="{{ $role->system_name ?? '' }}"
253 @if(intval(setting('registration-role', '0')) === $role->id) selected @endif
255 {{ $role->display_name }}
262 <div class="grid half gap-xl">
264 <label for="setting-registration-restrict" class="setting-list-label">{{ trans('settings.reg_confirm_restrict_domain') }}</label>
265 <p class="small">{!! trans('settings.reg_confirm_restrict_domain_desc') !!}</p>
268 <input type="text" id="setting-registration-restrict" name="setting-registration-restrict" placeholder="{{ trans('settings.reg_confirm_restrict_domain_placeholder') }}" value="{{ setting('registration-restrict', '') }}">
272 <div class="grid half gap-xl">
274 <label class="setting-list-label">{{ trans('settings.reg_email_confirmation') }}</label>
275 <p class="small">{{ trans('settings.reg_confirm_email_desc') }}</p>
278 @include('form.toggle-switch', [
279 'name' => 'setting-registration-confirmation',
280 'value' => setting('registration-confirmation'),
281 'label' => trans('settings.reg_email_confirmation_toggle')
288 <div class="form-group text-right">
289 <button type="submit" class="button">{{ trans('settings.settings_save') }}</button>
299 @include('entities.selector-popup', ['entityTypes' => 'page'])