1 @extends('simple-layout')
4 <div class="container small">
6 @include('settings.navbar-with-version', ['selected' => 'settings'])
8 <div class="card content-wrap auto-height">
9 <h2 id="features" class="list-heading">{{ trans('settings.app_features_security') }}</h2>
10 <form action="{{ url("/settings") }}" method="POST">
12 <input type="hidden" name="section" value="features">
14 <div class="setting-list">
17 <div class="grid half gap-xl">
19 <label for="setting-app-public" class="setting-list-label">{{ trans('settings.app_public_access') }}</label>
20 <p class="small">{!! trans('settings.app_public_access_desc') !!}</p>
21 @if(userCan('users-manage'))
22 <p class="small mb-none">
23 <a href="{{ url($guestUser->getEditUrl()) }}">{!! trans('settings.app_public_access_desc_guest') !!}</a>
28 @include('components.toggle-switch', [
29 'name' => 'setting-app-public',
30 'value' => setting('app-public'),
31 'label' => trans('settings.app_public_access_toggle'),
36 <div class="grid half gap-xl">
38 <label class="setting-list-label">{{ trans('settings.app_secure_images') }}</label>
39 <p class="small">{{ trans('settings.app_secure_images_desc') }}</p>
42 @include('components.toggle-switch', [
43 'name' => 'setting-app-secure-images',
44 'value' => setting('app-secure-images'),
45 'label' => trans('settings.app_secure_images_toggle'),
50 <div class="grid half gap-xl">
52 <label class="setting-list-label">{{ trans('settings.app_disable_comments') }}</label>
53 <p class="small">{!! trans('settings.app_disable_comments_desc') !!}</p>
56 @include('components.toggle-switch', [
57 'name' => 'setting-app-disable-comments',
58 'value' => setting('app-disable-comments'),
59 'label' => trans('settings.app_disable_comments_toggle'),
67 <div class="form-group text-right">
68 <button type="submit" class="button">{{ trans('settings.settings_save') }}</button>
73 <div class="card content-wrap auto-height">
74 <h2 id="customization" class="list-heading">{{ trans('settings.app_customization') }}</h2>
75 <form action="{{ url("/settings") }}" method="POST" enctype="multipart/form-data">
77 <input type="hidden" name="section" value="customization">
79 <div class="setting-list">
81 <div class="grid half gap-xl">
83 <label for="setting-app-name" class="setting-list-label">{{ trans('settings.app_name') }}</label>
84 <p class="small">{{ trans('settings.app_name_desc') }}</p>
87 <input type="text" value="{{ setting('app-name', 'BookStack') }}" name="setting-app-name" id="setting-app-name">
88 @include('components.toggle-switch', [
89 'name' => 'setting-app-name-header',
90 'value' => setting('app-name-header'),
91 'label' => trans('settings.app_name_header'),
96 <div class="grid half gap-xl">
98 <label class="setting-list-label">{{ trans('settings.app_editor') }}</label>
99 <p class="small">{{ trans('settings.app_editor_desc') }}</p>
102 <select name="setting-app-editor" id="setting-app-editor">
103 <option @if(setting('app-editor') === 'wysiwyg') selected @endif value="wysiwyg">WYSIWYG</option>
104 <option @if(setting('app-editor') === 'markdown') selected @endif value="markdown">Markdown</option>
109 <div class="grid half gap-xl">
111 <label class="setting-list-label">{{ trans('settings.app_logo') }}</label>
112 <p class="small">{!! trans('settings.app_logo_desc') !!}</p>
115 @include('components.image-picker', [
116 'removeName' => 'setting-app-logo',
117 'removeValue' => 'none',
118 'defaultImage' => url('/logo.png'),
119 'currentImage' => setting('app-logo'),
120 'name' => 'app_logo',
121 'imageClass' => 'logo-image',
126 <!-- Primary Color -->
127 <div class="grid half gap-xl">
129 <label class="setting-list-label">{{ trans('settings.app_primary_color') }}</label>
130 <p class="small">{!! trans('settings.app_primary_color_desc') !!}</p>
132 <div setting-app-color-picker class="text-m-right pt-xs">
133 <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">
134 <input type="hidden" value="{{ setting('app-color-light') }}" name="setting-app-color-light" id="setting-app-color-light">
136 <button type="button" class="text-button text-muted mt-s" setting-app-color-picker-default>{{ trans('common.default') }}</button>
137 <span class="sep">|</span>
138 <button type="button" class="text-button text-muted mt-s" setting-app-color-picker-reset>{{ trans('common.reset') }}</button>
144 <!-- Entity Color -->
147 <label class="setting-list-label">{{ trans('settings.content_colors') }}</label>
148 <p class="small">{!! trans('settings.content_colors_desc') !!}</p>
150 <div class="grid half pt-m">
152 @include('components.setting-entity-color-picker', ['type' => 'bookshelf'])
153 @include('components.setting-entity-color-picker', ['type' => 'book'])
154 @include('components.setting-entity-color-picker', ['type' => 'chapter'])
157 @include('components.setting-entity-color-picker', ['type' => 'page'])
158 @include('components.setting-entity-color-picker', ['type' => 'page-draft'])
163 <div homepage-control id="homepage-control" class="grid half gap-xl">
165 <label for="setting-app-homepage" class="setting-list-label">{{ trans('settings.app_homepage') }}</label>
166 <p class="small">{{ trans('settings.app_homepage_desc') }}</p>
169 <select name="setting-app-homepage-type" id="setting-app-homepage-type">
170 <option @if(setting('app-homepage-type') === 'default') selected @endif value="default">{{ trans('common.default') }}</option>
171 <option @if(setting('app-homepage-type') === 'books') selected @endif value="books">{{ trans('entities.books') }}</option>
172 <option @if(setting('app-homepage-type') === 'bookshelves') selected @endif value="bookshelves">{{ trans('entities.shelves') }}</option>
173 <option @if(setting('app-homepage-type') === 'page') selected @endif value="page">{{ trans('entities.pages_specific') }}</option>
176 <div page-picker-container style="display: none;" class="mt-m">
177 @include('components.page-picker', ['name' => 'setting-app-homepage', 'placeholder' => trans('settings.app_homepage_select'), 'value' => setting('app-homepage')])
183 <label for="setting-app-privacy-link" class="setting-list-label">{{ trans('settings.app_footer_links') }}</label>
184 <p class="small">{{ trans('settings.app_footer_links_desc') }}</p>
185 <div class="grid half pt-m">
187 <label for="setting-app-privacy-policy" class="text-dark">{{ trans('settings.app_privacy_policy') }}</label>
188 <input type="text" value="{{ setting('app-privacy-policy', '') }}" name="setting-app-privacy-policy" id="setting-app-privacy-policy">
191 <label for="setting-app-terms-of-service" class="text-dark">{{ trans('settings.app_terms_of_service') }}</label>
192 <input type="text" value="{{ setting('app-terms-of-service', '') }}" name="setting-app-terms-of-service" id="setting-app-terms-of-service">
199 <label for="setting-app-custom-head" class="setting-list-label">{{ trans('settings.app_custom_html') }}</label>
200 <p class="small">{{ trans('settings.app_custom_html_desc') }}</p>
201 <textarea name="setting-app-custom-head" id="setting-app-custom-head" class="simple-code-input mt-m">{{ setting('app-custom-head', '') }}</textarea>
202 <p class="small text-right">{{ trans('settings.app_custom_html_disabled_notice') }}</p>
208 <div class="form-group text-right">
209 <button type="submit" class="button">{{ trans('settings.settings_save') }}</button>
214 <div class="card content-wrap auto-height">
215 <h2 id="registration" class="list-heading">{{ trans('settings.reg_settings') }}</h2>
216 <form action="{{ url("/settings") }}" method="POST">
218 <input type="hidden" name="section" value="registration">
220 <div class="setting-list">
221 <div class="grid half gap-xl">
223 <label class="setting-list-label">{{ trans('settings.reg_enable') }}</label>
224 <p class="small">{!! trans('settings.reg_enable_desc') !!}</p>
227 @include('components.toggle-switch', [
228 'name' => 'setting-registration-enabled',
229 'value' => setting('registration-enabled'),
230 'label' => trans('settings.reg_enable_toggle')
233 @if(in_array(config('auth.method'), ['ldap', 'saml2']))
234 <div class="text-warn text-small mb-l">{{ trans('settings.reg_enable_external_warning') }}</div>
237 <label for="setting-registration-role">{{ trans('settings.reg_default_role') }}</label>
238 <select id="setting-registration-role" name="setting-registration-role" @if($errors->has('setting-registration-role')) class="neg" @endif>
239 @foreach(\BookStack\Auth\Role::all() as $role)
240 <option value="{{$role->id}}"
241 data-system-role-name="{{ $role->system_name ?? '' }}"
242 @if(setting('registration-role', \BookStack\Auth\Role::first()->id) == $role->id) selected @endif
244 {{ $role->display_name }}
251 <div class="grid half gap-xl">
253 <label for="setting-registration-restrict" class="setting-list-label">{{ trans('settings.reg_confirm_restrict_domain') }}</label>
254 <p class="small">{!! trans('settings.reg_confirm_restrict_domain_desc') !!}</p>
257 <input type="text" id="setting-registration-restrict" name="setting-registration-restrict" placeholder="{{ trans('settings.reg_confirm_restrict_domain_placeholder') }}" value="{{ setting('registration-restrict', '') }}">
261 <div class="grid half gap-xl">
263 <label class="setting-list-label">{{ trans('settings.reg_email_confirmation') }}</label>
264 <p class="small">{{ trans('settings.reg_confirm_email_desc') }}</p>
267 @include('components.toggle-switch', [
268 'name' => 'setting-registration-confirmation',
269 'value' => setting('registration-confirmation'),
270 'label' => trans('settings.reg_email_confirmation_toggle')
277 <div class="form-group text-right">
278 <button type="submit" class="button">{{ trans('settings.settings_save') }}</button>
285 @include('components.entity-selector-popup', ['entityTypes' => 'page'])