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" ng-cloak>
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 <div toggle-switch name="setting-app-name-header" value="{{ setting('app-name-header') }}"></div>
28 <div class="form-group">
29 <label for="setting-app-public">{{ trans('settings.app_public_viewing') }}</label>
30 <div toggle-switch name="setting-app-public" value="{{ setting('app-public') }}"></div>
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 <div toggle-switch name="setting-app-secure-images" value="{{ setting('app-secure-images') }}"></div>
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>
51 <image-picker resize-height="43" show-remove="true" resize-width="200" current-image="{{ setting('app-logo', '') }}" default-image="{{ baseUrl('/logo.png') }}" name="setting-app-logo" image-class="logo-image"></image-picker>
53 <div class="form-group" id="color-control">
54 <label for="setting-app-color">{{ trans('settings.app_primary_color') }}</label>
55 <p class="small">{!! trans('settings.app_primary_color_desc') !!}</p>
56 <input type="text" value="{{ setting('app-color', '') }}" name="setting-app-color" id="setting-app-color" placeholder="#0288D1">
57 <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)">
63 <div class="form-group">
64 <label for="setting-app-custom-head">{{ trans('settings.app_custom_html') }}</label>
65 <p class="small">{{ trans('settings.app_custom_html_desc') }}</p>
66 <textarea name="setting-app-custom-head" id="setting-app-custom-head">{{ setting('app-custom-head', '') }}</textarea>
69 <hr class="margin-top">
71 <h3>{{ trans('settings.reg_settings') }}</h3>
74 <div class="col-md-6">
75 <div class="form-group">
76 <label for="setting-registration-enabled">{{ trans('settings.reg_allow') }}</label>
77 <div toggle-switch name="setting-registration-enabled" value="{{ setting('registration-enabled') }}"></div>
79 <div class="form-group">
80 <label for="setting-registration-role">{{ trans('settings.reg_default_role') }}</label>
81 <select id="setting-registration-role" name="setting-registration-role" @if($errors->has('setting-registration-role')) class="neg" @endif>
82 @foreach(\BookStack\Role::all() as $role)
83 <option value="{{$role->id}}" data-role-name="{{ $role->name }}"
84 @if(setting('registration-role', \BookStack\Role::first()->id) == $role->id) selected @endif
86 {{ $role->display_name }}
91 <div class="form-group">
92 <label for="setting-registration-confirmation">{{ trans('settings.reg_confirm_email') }}</label>
93 <p class="small">{{ trans('settings.reg_confirm_email_desc') }}</p>
94 <div toggle-switch name="setting-registration-confirmation" value="{{ setting('registration-confirmation') }}"></div>
97 <div class="col-md-6">
98 <div class="form-group">
99 <label for="setting-registration-restrict">{{ trans('settings.reg_confirm_restrict_domain') }}</label>
100 <p class="small">{!! trans('settings.reg_confirm_restrict_domain_desc') !!}</p>
101 <input type="text" id="setting-registration-restrict" name="setting-registration-restrict" placeholder="{{ trans('settings.reg_confirm_restrict_domain_placeholder') }}" value="{{ setting('registration-restrict', '') }}">
106 <hr class="margin-top">
108 <div class="form-group">
109 <span class="float right muted">
110 BookStack @if(strpos($version, 'v') !== 0) version @endif {{ $version }}
112 <button type="submit" class="button pos">{{ trans('settings.settings_save') }}</button>
118 @include('partials/image-manager', ['imageType' => 'system'])
123 <script src="{{ baseUrl("/libs/jq-color-picker/tiny-color-picker.min.js?version=1.0.0") }}"></script>
124 <script type="text/javascript">
125 $('#setting-app-color').colorPicker({
127 renderCallback: function($elm, toggled) {
128 var hexVal = '#' + this.color.colors.HEX;
129 var rgb = this.color.colors.RND.rgb;
130 var rgbLightVal = 'rgba('+ [rgb.r, rgb.g, rgb.b, '0.15'].join(',') +')';
131 // Set textbox color to hex color code.
132 var isEmpty = $.trim($elm.val()).length === 0;
133 if (!isEmpty) $elm.val(hexVal);
134 $('#setting-app-color-light').val(isEmpty ? '' : rgbLightVal);
135 // Set page elements to provide preview
136 $('#header, .image-picker .button').attr('style', 'background-color:'+ hexVal+'!important;');
137 $('.faded-small').css('background-color', rgbLightVal);
138 $('.setting-nav a.selected').css('border-bottom-color', hexVal + '!important');