1 @extends('simple-layout')
4 <div class="container small">
6 <div class="grid left-focus v-center no-row-gap">
8 @include('settings.navbar', ['selected' => 'settings'])
10 <div class="text-right p-m">
11 <a target="_blank" rel="noopener noreferrer" href="https://github.com/BookStackApp/BookStack/releases">
12 BookStack @if(strpos($version, 'v') !== 0) version @endif {{ $version }}
17 <div class="card content-wrap auto-height">
18 <h2 class="list-heading">{{ trans('settings.app_features_security') }}</h2>
19 <form action="{{ url("/settings") }}" method="POST">
22 <div class="setting-list">
25 <div class="grid half gap-xl">
27 <label for="setting-app-public" class="setting-list-label">{{ trans('settings.app_public_access') }}</label>
28 <p class="small">{!! trans('settings.app_public_access_desc') !!}</p>
29 @if(userCan('users-manage'))
30 <p class="small mb-none">
31 <a href="{{ url($guestUser->getEditUrl()) }}">{!! trans('settings.app_public_access_desc_guest') !!}</a>
36 @include('components.toggle-switch', [
37 'name' => 'setting-app-public',
38 'value' => setting('app-public'),
39 'label' => trans('settings.app_public_access_toggle'),
44 <div class="grid half gap-xl">
46 <label class="setting-list-label">{{ trans('settings.app_secure_images') }}</label>
47 <p class="small">{{ trans('settings.app_secure_images_desc') }}</p>
50 @include('components.toggle-switch', [
51 'name' => 'setting-app-secure-images',
52 'value' => setting('app-secure-images'),
53 'label' => trans('settings.app_secure_images_toggle'),
58 <div class="grid half gap-xl">
60 <label class="setting-list-label">{{ trans('settings.app_disable_comments') }}</label>
61 <p class="small">{!! trans('settings.app_disable_comments_desc') !!}</p>
64 @include('components.toggle-switch', [
65 'name' => 'setting-app-disable-comments',
66 'value' => setting('app-disable-comments'),
67 'label' => trans('settings.app_disable_comments_toggle'),
75 <div class="form-group text-right">
76 <button type="submit" class="button">{{ trans('settings.settings_save') }}</button>
81 <div class="card content-wrap auto-height">
82 <h2 class="list-heading">{{ trans('settings.app_customization') }}</h2>
83 <form action="{{ url("/settings") }}" method="POST" enctype="multipart/form-data">
86 <div class="setting-list">
88 <div class="grid half gap-xl">
90 <label for="setting-app-name" class="setting-list-label">{{ trans('settings.app_name') }}</label>
91 <p class="small">{{ trans('settings.app_name_desc') }}</p>
94 <input type="text" value="{{ setting('app-name', 'BookStack') }}" name="setting-app-name" id="setting-app-name">
95 @include('components.toggle-switch', [
96 'name' => 'setting-app-name-header',
97 'value' => setting('app-name-header'),
98 'label' => trans('settings.app_name_header'),
103 <div class="grid half gap-xl">
105 <label class="setting-list-label">{{ trans('settings.app_editor') }}</label>
106 <p class="small">{{ trans('settings.app_editor_desc') }}</p>
109 <select name="setting-app-editor" id="setting-app-editor">
110 <option @if(setting('app-editor') === 'wysiwyg') selected @endif value="wysiwyg">WYSIWYG</option>
111 <option @if(setting('app-editor') === 'markdown') selected @endif value="markdown">Markdown</option>
116 <div class="grid half gap-xl">
118 <label class="setting-list-label">{{ trans('settings.app_logo') }}</label>
119 <p class="small">{!! trans('settings.app_logo_desc') !!}</p>
122 @include('components.image-picker', [
123 'removeName' => 'setting-app-logo',
124 'removeValue' => 'none',
125 'defaultImage' => url('/logo.png'),
126 'currentImage' => setting('app-logo'),
127 'name' => 'app_logo',
128 'imageClass' => 'logo-image',
133 <!-- Primary Color -->
134 <div class="grid half gap-xl">
136 <label class="setting-list-label">{{ trans('settings.app_primary_color') }}</label>
137 <p class="small">{!! trans('settings.app_primary_color_desc') !!}</p>
139 <div setting-app-color-picker class="text-m-right">
140 <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">
141 <input type="hidden" value="{{ setting('app-color-light') }}" name="setting-app-color-light" id="setting-app-color-light">
143 <button type="button" class="text-button text-muted mt-s mx-s" setting-app-color-picker-default>{{ trans('common.default') }}</button>
144 <span class="sep">|</span>
145 <button type="button" class="text-button text-muted mt-s mx-s" setting-app-color-picker-reset>{{ trans('common.reset') }}</button>
150 <div class="grid half gap-xl">
152 <label class="setting-list-label">{{ trans('settings.bookshelf_color') }}</label>
153 <p class="small">{!! trans('settings.bookshelf_color_desc') !!}</p>
155 <div setting-color-picker class="text-m-right">
156 <input type="color" data-default="#a94747" data-current="{{ setting('bookshelf-color') }}" value="{{ setting('bookshelf-color') }}" name="setting-bookshelf-color" id="setting-bookshelf-color" placeholder="#a94747">
158 <button type="button" class="text-button text-muted mt-s mx-s" setting-color-picker-default>{{ trans('common.default') }}</button>
159 <span class="sep">|</span>
160 <button type="button" class="text-button text-muted mt-s mx-s" setting-color-picker-reset>{{ trans('common.reset') }}</button>
165 <div class="grid half gap-xl">
167 <label class="setting-list-label">{{ trans('settings.book_color') }}</label>
168 <p class="small">{!! trans('settings.book_color_desc') !!}</p>
170 <div setting-color-picker class="text-m-right">
171 <input type="color" data-default="#077b70" data-current="{{ setting('book-color') }}" value="{{ setting('book-color') }}" name="setting-book-color" id="setting-book-color" placeholder="#077b70">
173 <button type="button" class="text-button text-muted mt-s mx-s" setting-color-picker-default>{{ trans('common.default') }}</button>
174 <span class="sep">|</span>
175 <button type="button" class="text-button text-muted mt-s mx-s" setting-color-picker-reset>{{ trans('common.reset') }}</button>
179 <!-- Chapter Color -->
180 <div class="grid half gap-xl">
182 <label class="setting-list-label">{{ trans('settings.chapter_color') }}</label>
183 <p class="small">{!! trans('settings.chapter_color_desc') !!}</p>
185 <div setting-color-picker class="text-m-right">
186 <input type="color" data-default="#af4d0d" data-current="{{ setting('chapter-color') }}" value="{{ setting('chapter-color') }}" name="setting-chapter-color" id="setting-chapter-color" placeholder="#af4d0d">
188 <button type="button" class="text-button text-muted mt-s mx-s" setting-color-picker-default>{{ trans('common.default') }}</button>
189 <span class="sep">|</span>
190 <button type="button" class="text-button text-muted mt-s mx-s" setting-color-picker-reset>{{ trans('common.reset') }}</button>
195 <div class="grid half gap-xl">
197 <label class="setting-list-label">{{ trans('settings.page_color') }}</label>
198 <p class="small">{!! trans('settings.page_color_desc') !!}</p>
200 <div setting-color-picker class="text-m-right">
201 <input type="color" data-default="#206ea7" data-current="{{ setting('page-color') }}" value="{{ setting('page-color') }}" name="setting-page-color" id="setting-page-color" placeholder="#206ea7">
203 <button type="button" class="text-button text-muted mt-s mx-s" setting-color-picker-default>{{ trans('common.default') }}</button>
204 <span class="sep">|</span>
205 <button type="button" class="text-button text-muted mt-s mx-s" setting-color-picker-reset>{{ trans('common.reset') }}</button>
209 <!-- Page Draft Color -->
210 <div class="grid half gap-xl">
212 <label class="setting-list-label">{{ trans('settings.page_draft_color') }}</label>
213 <p class="small">{!! trans('settings.page_draft_color_desc') !!}</p>
215 <div setting-color-picker class="text-m-right">
216 <input type="color" data-default="#7e50b1" data-current="{{ setting('page-draft-color') }}" value="{{ setting('page-draft-color') }}" name="setting-page-draft-color" id="setting-page-draft-color" placeholder="#7e50b1">
218 <button type="button" class="text-button text-muted mt-s mx-s" setting-color-picker-default>{{ trans('common.default') }}</button>
219 <span class="sep">|</span>
220 <button type="button" class="text-button text-muted mt-s mx-s" setting-color-picker-reset>{{ trans('common.reset') }}</button>
224 <div homepage-control id="homepage-control" class="grid half gap-xl">
226 <label for="setting-app-homepage" class="setting-list-label">{{ trans('settings.app_homepage') }}</label>
227 <p class="small">{{ trans('settings.app_homepage_desc') }}</p>
230 <select name="setting-app-homepage-type" id="setting-app-homepage-type">
231 <option @if(setting('app-homepage-type') === 'default') selected @endif value="default">{{ trans('common.default') }}</option>
232 <option @if(setting('app-homepage-type') === 'books') selected @endif value="books">{{ trans('entities.books') }}</option>
233 <option @if(setting('app-homepage-type') === 'bookshelves') selected @endif value="bookshelves">{{ trans('entities.shelves') }}</option>
234 <option @if(setting('app-homepage-type') === 'page') selected @endif value="page">{{ trans('entities.pages_specific') }}</option>
237 <div page-picker-container style="display: none;" class="mt-m">
238 @include('components.page-picker', ['name' => 'setting-app-homepage', 'placeholder' => trans('settings.app_homepage_select'), 'value' => setting('app-homepage')])
245 <label for="setting-app-custom-head" class="setting-list-label">{{ trans('settings.app_custom_html') }}</label>
246 <p class="small">{{ trans('settings.app_custom_html_desc') }}</p>
247 <textarea name="setting-app-custom-head" id="setting-app-custom-head" class="simple-code-input mt-m">{{ setting('app-custom-head', '') }}</textarea>
248 <p class="small text-right">{{ trans('settings.app_custom_html_disabled_notice') }}</p>
254 <div class="form-group text-right">
255 <button type="submit" class="button">{{ trans('settings.settings_save') }}</button>
260 <div class="card content-wrap auto-height">
261 <h2 class="list-heading">{{ trans('settings.reg_settings') }}</h2>
262 <form action="{{ url("/settings") }}" method="POST">
265 <div class="setting-list">
266 <div class="grid half gap-xl">
268 <label class="setting-list-label">{{ trans('settings.reg_enable') }}</label>
269 <p class="small">{!! trans('settings.reg_enable_desc') !!}</p>
272 @include('components.toggle-switch', [
273 'name' => 'setting-registration-enabled',
274 'value' => setting('registration-enabled'),
275 'label' => trans('settings.reg_enable_toggle')
278 <label for="setting-registration-role">{{ trans('settings.reg_default_role') }}</label>
279 <select id="setting-registration-role" name="setting-registration-role" @if($errors->has('setting-registration-role')) class="neg" @endif>
280 @foreach(\BookStack\Auth\Role::all() as $role)
281 <option value="{{$role->id}}" data-role-name="{{ $role->name }}"
282 @if(setting('registration-role', \BookStack\Auth\Role::first()->id) == $role->id) selected @endif
284 {{ $role->display_name }}
291 <div class="grid half gap-xl">
293 <label for="setting-registration-restrict" class="setting-list-label">{{ trans('settings.reg_confirm_restrict_domain') }}</label>
294 <p class="small">{!! trans('settings.reg_confirm_restrict_domain_desc') !!}</p>
297 <input type="text" id="setting-registration-restrict" name="setting-registration-restrict" placeholder="{{ trans('settings.reg_confirm_restrict_domain_placeholder') }}" value="{{ setting('registration-restrict', '') }}">
301 <div class="grid half gap-xl">
303 <label class="setting-list-label">{{ trans('settings.reg_email_confirmation') }}</label>
304 <p class="small">{{ trans('settings.reg_confirm_email_desc') }}</p>
307 @include('components.toggle-switch', [
308 'name' => 'setting-registration-confirmation',
309 'value' => setting('registration-confirmation'),
310 'label' => trans('settings.reg_email_confirmation_toggle')
317 <div class="form-group text-right">
318 <button type="submit" class="button">{{ trans('settings.settings_save') }}</button>
325 @include('components.image-manager', ['imageType' => 'system'])
326 @include('components.entity-selector-popup', ['entityTypes' => 'page'])