5 @include('settings/navbar', ['selected' => 'settings'])
7 <div class="container small settings-container">
9 <h1>{{ trans('settings.settings') }}</h1>
11 <form action="{{ baseUrl("/settings") }}" method="POST">
14 <h3>{{ trans('settings.app_settings') }}</h3>
18 <div class="col-md-6">
19 <div class="form-group">
20 <label for="setting-app-name">{{ trans('settings.app_name') }}</label>
21 <p class="small">{{ trans('settings.app_name_desc') }}</p>
22 <input type="text" value="{{ setting('app-name', 'BookStack') }}" name="setting-app-name" id="setting-app-name">
24 <div class="form-group">
25 <label>{{ trans('settings.app_name_header') }}</label>
26 @include('components.toggle-switch', ['name' => 'setting-app-name-header', 'value' => setting('app-name-header')])
28 <div class="form-group">
29 <label for="setting-app-public">{{ trans('settings.app_public_viewing') }}</label>
30 @include('components.toggle-switch', ['name' => 'setting-app-public', 'value' => setting('app-public')])
32 <div class="form-group">
33 <label>{{ trans('settings.app_secure_images') }}</label>
34 <p class="small">{{ trans('settings.app_secure_images_desc') }}</p>
35 @include('components.toggle-switch', ['name' => 'setting-app-secure-images', 'value' => setting('app-secure-images')])
37 <div class="form-group">
38 <label for="setting-app-editor">{{ trans('settings.app_editor') }}</label>
39 <p class="small">{{ trans('settings.app_editor_desc') }}</p>
40 <select name="setting-app-editor" id="setting-app-editor">
41 <option @if(setting('app-editor') === 'wysiwyg') selected @endif value="wysiwyg">WYSIWYG</option>
42 <option @if(setting('app-editor') === 'markdown') selected @endif value="markdown">Markdown</option>
47 <div class="col-md-6">
48 <div class="form-group" id="logo-control">
49 <label for="setting-app-logo">{{ trans('settings.app_logo') }}</label>
50 <p class="small">{!! trans('settings.app_logo_desc') !!}</p>
52 @include('components.image-picker', [
53 'resizeHeight' => '43',
54 'resizeWidth' => '200',
56 'defaultImage' => baseUrl('/logo.png'),
57 'currentImage' => setting('app-logo'),
58 'name' => 'setting-app-logo',
59 'imageClass' => 'logo-image'
63 <div class="form-group" id="color-control">
64 <label for="setting-app-color">{{ trans('settings.app_primary_color') }}</label>
65 <p class="small">{!! trans('settings.app_primary_color_desc') !!}</p>
66 <input type="text" value="{{ setting('app-color', '') }}" name="setting-app-color" id="setting-app-color" placeholder="#0288D1">
67 <input type="hidden" value="{{ setting('app-color-light', '') }}" name="setting-app-color-light" id="setting-app-color-light" placeholder="rgba(21, 101, 192, 0.15)">
73 <div class="form-group">
74 <label for="setting-app-custom-head">{{ trans('settings.app_custom_html') }}</label>
75 <p class="small">{{ trans('settings.app_custom_html_desc') }}</p>
76 <textarea name="setting-app-custom-head" id="setting-app-custom-head">{{ setting('app-custom-head', '') }}</textarea>
79 <hr class="margin-top">
81 <h3>{{ trans('settings.reg_settings') }}</h3>
84 <div class="col-md-6">
85 <div class="form-group">
86 <label for="setting-registration-enabled">{{ trans('settings.reg_allow') }}</label>
87 @include('components.toggle-switch', ['name' => 'setting-registration-enabled', 'value' => setting('registration-enabled')])
89 <div class="form-group">
90 <label for="setting-registration-role">{{ trans('settings.reg_default_role') }}</label>
91 <select id="setting-registration-role" name="setting-registration-role" @if($errors->has('setting-registration-role')) class="neg" @endif>
92 @foreach(\BookStack\Role::all() as $role)
93 <option value="{{$role->id}}" data-role-name="{{ $role->name }}"
94 @if(setting('registration-role', \BookStack\Role::first()->id) == $role->id) selected @endif
96 {{ $role->display_name }}
101 <div class="form-group">
102 <label for="setting-registration-confirmation">{{ trans('settings.reg_confirm_email') }}</label>
103 <p class="small">{{ trans('settings.reg_confirm_email_desc') }}</p>
104 @include('components.toggle-switch', ['name' => 'setting-registration-confirmation', 'value' => setting('registration-confirmation')])
107 <div class="col-md-6">
108 <div class="form-group">
109 <label for="setting-registration-restrict">{{ trans('settings.reg_confirm_restrict_domain') }}</label>
110 <p class="small">{!! trans('settings.reg_confirm_restrict_domain_desc') !!}</p>
111 <input type="text" id="setting-registration-restrict" name="setting-registration-restrict" placeholder="{{ trans('settings.reg_confirm_restrict_domain_placeholder') }}" value="{{ setting('registration-restrict', '') }}">
116 <hr class="margin-top">
118 <div class="form-group">
119 <span class="float right muted">
120 BookStack @if(strpos($version, 'v') !== 0) version @endif {{ $version }}
122 <button type="submit" class="button pos">{{ trans('settings.settings_save') }}</button>
128 @include('partials/image-manager', ['imageType' => 'system'])
133 <script src="{{ baseUrl("/libs/jq-color-picker/tiny-color-picker.min.js?version=1.0.0") }}"></script>
134 <script type="text/javascript">
135 $('#setting-app-color').colorPicker({
137 renderCallback: function($elm, toggled) {
138 var hexVal = '#' + this.color.colors.HEX;
139 var rgb = this.color.colors.RND.rgb;
140 var rgbLightVal = 'rgba('+ [rgb.r, rgb.g, rgb.b, '0.15'].join(',') +')';
141 // Set textbox color to hex color code.
142 var isEmpty = $.trim($elm.val()).length === 0;
143 if (!isEmpty) $elm.val(hexVal);
144 $('#setting-app-color-light').val(isEmpty ? '' : rgbLightVal);
145 // Set page elements to provide preview
146 $('#header, .image-picker .button').attr('style', 'background-color:'+ hexVal+'!important;');
147 $('.faded-small').css('background-color', rgbLightVal);
148 $('.setting-nav a.selected').css('border-bottom-color', hexVal + '!important');