X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/0775cd09a152c6e05c100139812f1fc35cb1ac6a..refs/pull/262/head:/resources/views/settings/index.blade.php diff --git a/resources/views/settings/index.blade.php b/resources/views/settings/index.blade.php index 8ad219507..c736bc24e 100644 --- a/resources/views/settings/index.blade.php +++ b/resources/views/settings/index.blade.php @@ -8,7 +8,7 @@

{{ trans('settings.settings') }}

-
+ {!! csrf_field() !!}

{{ trans('settings.app_settings') }}

@@ -23,16 +23,16 @@
-
+ @include('components.toggle-switch', ['name' => 'setting-app-name-header', 'value' => setting('app-name-header')])
-
+ @include('components.toggle-switch', ['name' => 'setting-app-public', 'value' => setting('app-public')])

{{ trans('settings.app_secure_images_desc') }}

-
+ @include('components.toggle-switch', ['name' => 'setting-app-secure-images', 'value' => setting('app-secure-images')])
@@ -48,7 +48,18 @@

{!! trans('settings.app_logo_desc') !!}

- + + @include('components.image-picker', [ + 'resizeHeight' => '43', + 'resizeWidth' => '200', + 'showRemove' => true, + 'defaultImage' => baseUrl('/logo.png'), + 'currentImage' => setting('app-logo'), + 'name' => 'setting-app-logo', + 'imageClass' => 'logo-image', + 'currentId' => false + ]) +
@@ -74,7 +85,7 @@
-
+ @include('components.toggle-switch', ['name' => 'setting-registration-enabled', 'value' => setting('registration-enabled')])
@@ -91,7 +102,7 @@

{{ trans('settings.reg_confirm_email_desc') }}

-
+ @include('components.toggle-switch', ['name' => 'setting-registration-confirmation', 'value' => setting('registration-confirmation')])
@@ -115,7 +126,7 @@
-@include('partials/image-manager', ['imageType' => 'system']) +@include('components.image-manager', ['imageType' => 'system']) @stop @@ -132,10 +143,16 @@ var isEmpty = $.trim($elm.val()).length === 0; if (!isEmpty) $elm.val(hexVal); $('#setting-app-color-light').val(isEmpty ? '' : rgbLightVal); - // Set page elements to provide preview - $('#header, .image-picker .button').attr('style', 'background-color:'+ hexVal+'!important;'); - $('.faded-small').css('background-color', rgbLightVal); - $('.setting-nav a.selected').css('border-bottom-color', hexVal + '!important'); + + var customStyles = document.getElementById('custom-styles'); + var oldColor = customStyles.getAttribute('data-color'); + var oldColorLight = customStyles.getAttribute('data-color-light'); + + customStyles.innerHTML = customStyles.innerHTML.split(oldColor).join(hexVal); + customStyles.innerHTML = customStyles.innerHTML.split(oldColorLight).join(rgbLightVal); + + customStyles.setAttribute('data-color', hexVal); + customStyles.setAttribute('data-color-light', rgbLightVal); } });