Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,6 @@
<span asp-validation-for="StoreInformationSettings.AllowCustomerToSelectTheme"></span>
</div>
</div>
<div class="form-group">
<div class="col-8 col-md-4 col-sm-4 text-right">
<admin-label asp-for="StoreInformationSettings.AllowToSelectAdminTheme" class="control-label"/>
</div>
<div class="col-4 col-md-8 col-sm-8">
<label class="mt-checkbox mt-checkbox-outline control control-checkbox">
<admin-input asp-for="StoreInformationSettings.AllowToSelectAdminTheme"/>
<div class="control__indicator"></div>
</label>
<span asp-validation-for="StoreInformationSettings.AllowToSelectAdminTheme"></span>
</div>
</div>
<div class="form-group">
<div class="col-8 col-md-4 col-sm-4 text-right">
<admin-label asp-for="StoreInformationSettings.LogoPictureId" class="control-label"/>
Expand Down
8 changes: 8 additions & 0 deletions src/Web/Grand.Web.Store/Controllers/SettingController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,15 @@ public async Task<IActionResult> GeneralCommon(GeneralCommonSettingsModel model)
var storeScope = GetStoreScope();

var storeInformationSettings = await settingService.LoadSetting<StoreInformationSettings>(storeScope);

// Preserve the admin theme selection - store owners cannot change it
var allowToSelectAdminTheme = storeInformationSettings.AllowToSelectAdminTheme;

storeInformationSettings = model.StoreInformationSettings.ToEntity(storeInformationSettings);

// Restore the preserved admin theme selection
storeInformationSettings.AllowToSelectAdminTheme = allowToSelectAdminTheme;

await settingService.SaveSetting(storeInformationSettings, storeScope);

var dateTimeSettings = await settingService.LoadSetting<DateTimeSettings>(storeScope);
Expand Down
Loading