]> BookStack Code Mirror - bookstack/blobdiff - resources/views/settings/index.blade.php
Add footer element, styles, and associated settings
[bookstack] / resources / views / settings / index.blade.php
index 4da1d90b0b5b43429530fae11239f2d776a49633..4f29968bb70c08fb4deff82cfe21bdc321806701 100644 (file)
         </div>
 
         <div class="card content-wrap auto-height">
-            <h2 class="list-heading">{{ trans('settings.app_features_security') }}</h2>
+            <h2 id="features" class="list-heading">{{ trans('settings.app_features_security') }}</h2>
             <form action="{{ url("/settings") }}" method="POST">
                 {!! csrf_field() !!}
+                <input type="hidden" name="section" value="features">
 
                 <div class="setting-list">
 
         </div>
 
         <div class="card content-wrap auto-height">
-            <h2 class="list-heading">{{ trans('settings.app_customization') }}</h2>
+            <h2 id="customization" class="list-heading">{{ trans('settings.app_customization') }}</h2>
             <form action="{{ url("/settings") }}" method="POST" enctype="multipart/form-data">
                 {!! csrf_field() !!}
+                <input type="hidden" name="section" value="customization">
 
                 <div class="setting-list">
 
                         <div setting-app-color-picker class="text-m-right">
                             <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">
                             <input type="hidden" value="{{ setting('app-color-light') }}" name="setting-app-color-light" id="setting-app-color-light">
-                            <br>
-                            <button type="button" class="text-button text-muted mt-s mx-s" setting-app-color-picker-default>{{ trans('common.default') }}</button>
-                            <span class="sep">|</span>
-                            <button type="button" class="text-button text-muted mt-s mx-s" setting-app-color-picker-reset>{{ trans('common.reset') }}</button>
-                        </div>
-                    </div>
-
-                    <!-- Shelf Color -->
-                    <div class="grid half gap-xl">
-                        <div>
-                            <label class="setting-list-label">{{ trans('settings.bookshelf_color') }}</label>
-                            <p class="small">{!! trans('settings.bookshelf_color_desc') !!}</p>
-                        </div>
-                        <div setting-color-picker class="text-m-right">
-                            <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">
-                            <br>
-                            <button type="button" class="text-button text-muted mt-s mx-s" setting-color-picker-default>{{ trans('common.default') }}</button>
-                            <span class="sep">|</span>
-                            <button type="button" class="text-button text-muted mt-s mx-s" setting-color-picker-reset>{{ trans('common.reset') }}</button>
-                        </div>
-                    </div>
-
-                    <!-- Book Color -->
-                    <div class="grid half gap-xl">
-                        <div>
-                            <label class="setting-list-label">{{ trans('settings.book_color') }}</label>
-                            <p class="small">{!! trans('settings.book_color_desc') !!}</p>
-                        </div>
-                        <div setting-color-picker class="text-m-right">
-                            <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">
-                            <br>
-                            <button type="button" class="text-button text-muted mt-s mx-s" setting-color-picker-default>{{ trans('common.default') }}</button>
-                            <span class="sep">|</span>
-                            <button type="button" class="text-button text-muted mt-s mx-s" setting-color-picker-reset>{{ trans('common.reset') }}</button>
-                        </div>
-                    </div>
-
-                    <!-- Chapter Color -->
-                    <div class="grid half gap-xl">
-                        <div>
-                            <label class="setting-list-label">{{ trans('settings.chapter_color') }}</label>
-                            <p class="small">{!! trans('settings.chapter_color_desc') !!}</p>
-                        </div>
-                        <div setting-color-picker class="text-m-right">
-                            <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">
-                            <br>
-                            <button type="button" class="text-button text-muted mt-s mx-s" setting-color-picker-default>{{ trans('common.default') }}</button>
-                            <span class="sep">|</span>
-                            <button type="button" class="text-button text-muted mt-s mx-s" setting-color-picker-reset>{{ trans('common.reset') }}</button>
-                        </div>
-                    </div>
+                            <div class="pr-s">
+                                <button type="button" class="text-button text-muted mt-s" setting-app-color-picker-default>{{ trans('common.default') }}</button>
+                                <span class="sep">|</span>
+                                <button type="button" class="text-button text-muted mt-s" setting-app-color-picker-reset>{{ trans('common.reset') }}</button>
+                            </div>
 
-                    <!-- Page Color -->
-                    <div class="grid half gap-xl">
-                        <div>
-                            <label class="setting-list-label">{{ trans('settings.page_color') }}</label>
-                            <p class="small">{!! trans('settings.page_color_desc') !!}</p>
-                        </div>
-                        <div setting-color-picker class="text-m-right">
-                            <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">
-                            <br>
-                            <button type="button" class="text-button text-muted mt-s mx-s" setting-color-picker-default>{{ trans('common.default') }}</button>
-                            <span class="sep">|</span>
-                            <button type="button" class="text-button text-muted mt-s mx-s" setting-color-picker-reset>{{ trans('common.reset') }}</button>
                         </div>
                     </div>
 
-                    <!-- Page Draft Color -->
-                    <div class="grid half gap-xl">
+                    <!-- Entity Color -->
+                    <div class="pb-l">
                         <div>
-                            <label class="setting-list-label">{{ trans('settings.page_draft_color') }}</label>
-                            <p class="small">{!! trans('settings.page_draft_color_desc') !!}</p>
-                        </div>
-                        <div setting-color-picker class="text-m-right">
-                            <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">
-                            <br>
-                            <button type="button" class="text-button text-muted mt-s mx-s" setting-color-picker-default>{{ trans('common.default') }}</button>
-                            <span class="sep">|</span>
-                            <button type="button" class="text-button text-muted mt-s mx-s" setting-color-picker-reset>{{ trans('common.reset') }}</button>
+                            <label class="setting-list-label">{{ trans('settings.content_colors') }}</label>
+                            <p class="small">{!! trans('settings.content_colors_desc') !!}</p>
+                        </div>
+                        <div class="grid half pt-m">
+                            <div>
+                                @include('components.setting-entity-color-picker', ['type' => 'bookshelf'])
+                                @include('components.setting-entity-color-picker', ['type' => 'book'])
+                                @include('components.setting-entity-color-picker', ['type' => 'chapter'])
+                            </div>
+                            <div>
+                                @include('components.setting-entity-color-picker', ['type' => 'page'])
+                                @include('components.setting-entity-color-picker', ['type' => 'page-draft'])
+                            </div>
                         </div>
                     </div>
 
                         </div>
                     </div>
 
+                    <div>
+                        <label for="setting-app-privacy-link" class="setting-list-label">{{ trans('settings.app_footer_links') }}</label>
+                        <p class="small">{{ trans('settings.app_footer_links_desc') }}</p>
+                        <div class="grid half pt-m">
+                            <div>
+                                <label for="setting-app-privacy-policy" class="text-dark">{{ trans('settings.app_privacy_policy') }}</label>
+                                <input type="text" value="{{ setting('app-privacy-policy', '') }}" name="setting-app-privacy-policy" id="setting-app-privacy-policy">
+                            </div>
+                            <div>
+                                <label for="setting-app-terms-of-service" class="text-dark">{{ trans('settings.app_terms_of_service') }}</label>
+                                <input type="text" value="{{ setting('app-terms-of-service', '') }}" name="setting-app-terms-of-service" id="setting-app-terms-of-service">
+                            </div>
+                        </div>
+                    </div>
+
 
                     <div>
                         <label for="setting-app-custom-head" class="setting-list-label">{{ trans('settings.app_custom_html') }}</label>
         </div>
 
         <div class="card content-wrap auto-height">
-            <h2 class="list-heading">{{ trans('settings.reg_settings') }}</h2>
+            <h2 id="registration" class="list-heading">{{ trans('settings.reg_settings') }}</h2>
             <form action="{{ url("/settings") }}" method="POST">
                 {!! csrf_field() !!}
+                <input type="hidden" name="section" value="registration">
 
                 <div class="setting-list">
                     <div class="grid half gap-xl">
                                 'label' => trans('settings.reg_enable_toggle')
                             ])
 
+                            @if(in_array(config('auth.method'), ['ldap', 'saml2']))
+                                <div class="text-warn text-small mb-l">{{ trans('settings.reg_enable_external_warning') }}</div>
+                            @endif
+
                             <label for="setting-registration-role">{{ trans('settings.reg_default_role') }}</label>
                             <select id="setting-registration-role" name="setting-registration-role" @if($errors->has('setting-registration-role')) class="neg" @endif>
                                 @foreach(\BookStack\Auth\Role::all() as $role)