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>
149 <!-- Entity Color -->
152 <label class="setting-list-label">{{ trans('settings.content_colors') }}</label>
153 <p class="small">{!! trans('settings.content_colors_desc') !!}</p>
155 <div class="grid half pt-m">
157 @include('components.setting-entity-color-picker', ['type' => 'bookshelf'])
158 @include('components.setting-entity-color-picker', ['type' => 'book'])
159 @include('components.setting-entity-color-picker', ['type' => 'chapter'])
162 @include('components.setting-entity-color-picker', ['type' => 'page'])
163 @include('components.setting-entity-color-picker', ['type' => 'page-draft'])
168 <div homepage-control id="homepage-control" class="grid half gap-xl">
170 <label for="setting-app-homepage" class="setting-list-label">{{ trans('settings.app_homepage') }}</label>
171 <p class="small">{{ trans('settings.app_homepage_desc') }}</p>
174 <select name="setting-app-homepage-type" id="setting-app-homepage-type">
175 <option @if(setting('app-homepage-type') === 'default') selected @endif value="default">{{ trans('common.default') }}</option>
176 <option @if(setting('app-homepage-type') === 'books') selected @endif value="books">{{ trans('entities.books') }}</option>
177 <option @if(setting('app-homepage-type') === 'bookshelves') selected @endif value="bookshelves">{{ trans('entities.shelves') }}</option>
178 <option @if(setting('app-homepage-type') === 'page') selected @endif value="page">{{ trans('entities.pages_specific') }}</option>
181 <div page-picker-container style="display: none;" class="mt-m">
182 @include('components.page-picker', ['name' => 'setting-app-homepage', 'placeholder' => trans('settings.app_homepage_select'), 'value' => setting('app-homepage')])
189 <label for="setting-app-custom-head" class="setting-list-label">{{ trans('settings.app_custom_html') }}</label>
190 <p class="small">{{ trans('settings.app_custom_html_desc') }}</p>
191 <textarea name="setting-app-custom-head" id="setting-app-custom-head" class="simple-code-input mt-m">{{ setting('app-custom-head', '') }}</textarea>
192 <p class="small text-right">{{ trans('settings.app_custom_html_disabled_notice') }}</p>
198 <div class="form-group text-right">
199 <button type="submit" class="button">{{ trans('settings.settings_save') }}</button>
204 <div class="card content-wrap auto-height">
205 <h2 class="list-heading">{{ trans('settings.reg_settings') }}</h2>
206 <form action="{{ url("/settings") }}" method="POST">
209 <div class="setting-list">
210 <div class="grid half gap-xl">
212 <label class="setting-list-label">{{ trans('settings.reg_enable') }}</label>
213 <p class="small">{!! trans('settings.reg_enable_desc') !!}</p>
216 @include('components.toggle-switch', [
217 'name' => 'setting-registration-enabled',
218 'value' => setting('registration-enabled'),
219 'label' => trans('settings.reg_enable_toggle')
222 @if(config('auth.method') === 'ldap')
223 <div class="text-warn text-small mb-l">{{ trans('settings.reg_enable_ldap_warning') }}</div>
226 <label for="setting-registration-role">{{ trans('settings.reg_default_role') }}</label>
227 <select id="setting-registration-role" name="setting-registration-role" @if($errors->has('setting-registration-role')) class="neg" @endif>
228 @foreach(\BookStack\Auth\Role::all() as $role)
229 <option value="{{$role->id}}" data-role-name="{{ $role->name }}"
230 @if(setting('registration-role', \BookStack\Auth\Role::first()->id) == $role->id) selected @endif
232 {{ $role->display_name }}
239 <div class="grid half gap-xl">
241 <label for="setting-registration-restrict" class="setting-list-label">{{ trans('settings.reg_confirm_restrict_domain') }}</label>
242 <p class="small">{!! trans('settings.reg_confirm_restrict_domain_desc') !!}</p>
245 <input type="text" id="setting-registration-restrict" name="setting-registration-restrict" placeholder="{{ trans('settings.reg_confirm_restrict_domain_placeholder') }}" value="{{ setting('registration-restrict', '') }}">
249 <div class="grid half gap-xl">
251 <label class="setting-list-label">{{ trans('settings.reg_email_confirmation') }}</label>
252 <p class="small">{{ trans('settings.reg_confirm_email_desc') }}</p>
255 @include('components.toggle-switch', [
256 'name' => 'setting-registration-confirmation',
257 'value' => setting('registration-confirmation'),
258 'label' => trans('settings.reg_email_confirmation_toggle')
265 <div class="form-group text-right">
266 <button type="submit" class="button">{{ trans('settings.settings_save') }}</button>
273 @include('components.image-manager', ['imageType' => 'system'])
274 @include('components.entity-selector-popup', ['entityTypes' => 'page'])