|
|
@@ -48,21 +48,24 @@
|
|
|
</div>
|
|
|
<div class="col-md-9">
|
|
|
|
|
|
- <form action="/_api/admin/customize/theme" method="post" class="form-horizontal" id="cutomthemeSettingForm" role="form">
|
|
|
+ <form action="/_api/admin/customize/theme" method="post" class="form-horizontal" id="customthemeSettingForm" role="form">
|
|
|
<fieldset>
|
|
|
<legend>{{ t('customize_page.Theme') }}</legend>
|
|
|
|
|
|
<div id="themeOptions" class="d-flex">
|
|
|
- <a href="#" class="default" data-theme="{{ webpack_asset('style-theme-default').css }}">
|
|
|
+ <a href="#" class="default" onclick="selectTheme('default')"
|
|
|
+ data-theme="{{ webpack_asset('style-theme-default').css }}">
|
|
|
{% include 'widget/theme-colorbox.html' %}
|
|
|
</a>
|
|
|
- <a href="#" class="default-dark" data-theme="{{ webpack_asset('style-theme-default-dark').css }}">
|
|
|
+ <a href="#" class="default-dark" onclick="selectTheme('default-dark')"
|
|
|
+ data-theme="{{ webpack_asset('style-theme-default-dark').css }}">
|
|
|
{% include 'widget/theme-colorbox.html' %}
|
|
|
</a>
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
<div class="col-xs-offset-5 col-xs-6">
|
|
|
+ <input type="hidden" id="hiddenInputTheme" name="settingForm[customize:theme]" value="{{ settingForm['customize:theme'] }}">
|
|
|
<input type="hidden" name="_csrf" value="{{ csrf() }}">
|
|
|
<button type="submit" class="btn btn-primary">{{ t('Update') }}</button>
|
|
|
</div>
|
|
|
@@ -424,7 +427,9 @@ window.addEventListener('load', (event) => {
|
|
|
{% block body_end %}
|
|
|
{% parent %}
|
|
|
<script>
|
|
|
- $('#cutomcssSettingForm, #cutomscriptSettingForm, #cutomlayoutSettingForm, #cutombehaviorSettingForm, #customfeaturesSettingForm, #cutomheaderSettingForm, #cutomhighlightJsStyleSettingForm').each(function() {
|
|
|
+ $(`#customthemeSettingForm, #cutomlayoutSettingForm, #cutombehaviorSettingForm, #cutomhighlightJsStyleSettingForm,
|
|
|
+ #customfeaturesSettingForm, #cutomheaderSettingForm, #cutomcssSettingForm, #cutomscriptSettingForm`
|
|
|
+ ).each(function() {
|
|
|
$(this).submit(function()
|
|
|
{
|
|
|
function showMessage(formId, msg, status) {
|
|
|
@@ -500,6 +505,10 @@ window.addEventListener('load', (event) => {
|
|
|
$('#themeOptions').styleSwitcher(options);
|
|
|
});
|
|
|
|
|
|
+ function selectTheme(theme) {
|
|
|
+ // update hidden
|
|
|
+ $('#hiddenInputTheme').val(theme);
|
|
|
+ }
|
|
|
</script>
|
|
|
|
|
|
</div>
|