mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-06 12:02:45 +03:00
Cleaned some form styling
Removed uppercasing of labels to make a little friendlier. Extracted out toggleswitch JS into own component. Improved basic code input for html-head-input area.
This commit is contained in:
@@ -1,15 +1,4 @@
|
||||
<div toggle-switch="{{$name}}" class="toggle-switch @if($value) active @endif">
|
||||
<input type="hidden" name="{{$name}}" value="{{$value?'true':'false'}}"/>
|
||||
<div class="switch-handle"></div>
|
||||
</div>
|
||||
<script>
|
||||
(function() {
|
||||
var toggle = document.querySelector('[toggle-switch="{{$name}}"]');
|
||||
var toggleInput = toggle.querySelector('input');
|
||||
toggle.onclick = function(event) {
|
||||
var checked = toggleInput.value !== 'true';
|
||||
toggleInput.value = checked ? 'true' : 'false';
|
||||
checked ? toggle.classList.add('active') : toggle.classList.remove('active');
|
||||
};
|
||||
})()
|
||||
</script>
|
||||
</div>
|
@@ -88,7 +88,7 @@
|
||||
<div class="form-group">
|
||||
<label for="setting-app-custom-head">{{ trans('settings.app_custom_html') }}</label>
|
||||
<p class="small">{{ trans('settings.app_custom_html_desc') }}</p>
|
||||
<textarea name="setting-app-custom-head" id="setting-app-custom-head">{{ setting('app-custom-head', '') }}</textarea>
|
||||
<textarea class="simple-code-input" name="setting-app-custom-head" id="setting-app-custom-head">{{ setting('app-custom-head', '') }}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group text-right">
|
||||
|
Reference in New Issue
Block a user