public ActionResult Configure(ConfigurationModel model, FormCollection form) { if (!ModelState.IsValid) { return(Configure()); } if (!ModelState.IsValid) { return(Configure()); } ModelState.Clear(); var siteDependingSettingHelper = new SiteDependingSettingHelper(ViewData); int siteScope = this.GetActiveSiteScopeConfiguration(_siteService, _services.WorkContext); var settings = _services.Settings.LoadSetting <AliPayPaymentSettings>(siteScope); model.Copy(settings, false); siteDependingSettingHelper.UpdateSettings(settings, form, siteScope, _services.Settings); _services.Settings.SaveSetting(settings, 0); _services.Settings.ClearCache(); NotifySuccess(_services.Localization.GetResource("Plugins.Payments.AliPay.ConfigSaveNote")); return(Configure()); }
public ActionResult Configure(ConfigurationModel model, FormCollection form) { if (!HasPermission(false)) { return(Configure()); } if (!ModelState.IsValid) { return(Configure()); } var storeDependingSettingHelper = new SiteDependingSettingHelper(ViewData); int storeScope = this.GetActiveSiteScopeConfiguration(_services.SiteService, _services.WorkContext); var settings = _services.Settings.LoadSetting <QQExternalAuthSettings>(storeScope); settings.ClientKeyIdentifier = model.ClientKeyIdentifier; settings.ClientSecret = model.ClientSecret; storeDependingSettingHelper.UpdateSettings(settings, form, storeScope, _services.Settings); _services.Settings.ClearCache(); NotifySuccess(_services.Localization.GetResource("Admin.Common.DataSuccessfullySaved")); return(Configure()); }
public ActionResult Configure() { // load settings for a chosen store scope var storeScope = this.GetActiveSiteScopeConfiguration(_storeService, _workContext); var settings = _settingService.LoadSetting <ProfilerSettings>(storeScope); var storeDependingSettingHelper = new SiteDependingSettingHelper(ViewData); storeDependingSettingHelper.GetOverrideKeys(settings, settings, storeScope, _settingService); return(View(settings)); }
public ActionResult Configure() { var model = new ConfigurationModel(); int siteScope = this.GetActiveSiteScopeConfiguration(_siteService, _services.WorkContext); var settings = _services.Settings.LoadSetting <AliPayPaymentSettings>(siteScope); model.Copy(settings, true); var siteDependingSettingHelper = new SiteDependingSettingHelper(ViewData); siteDependingSettingHelper.GetOverrideKeys(settings, model, siteScope, _services.Settings); return(View(model)); }
public ActionResult Configure(ProfilerSettings model, FormCollection form) { if (!ModelState.IsValid) { return(Configure()); } // load settings for a chosen store scope var storeDependingSettingHelper = new SiteDependingSettingHelper(ViewData); var storeScope = this.GetActiveSiteScopeConfiguration(_storeService, _workContext); storeDependingSettingHelper.UpdateSettings(model /*settings*/, form, storeScope, _settingService); _settingService.ClearCache(); return(Configure()); }
public ActionResult Configure() { int siteScope = ContollerExtensions.GetActiveSiteScopeConfiguration(this, this._siteService, this._workContext); CustomBannerSettings customBannerSettings = this._settingService.LoadSetting <CustomBannerSettings>(siteScope); ConfigurationModel model = new ConfigurationModel(); model.MaxBannerHeight = customBannerSettings.MaxBannerHeight; model.StretchPicture = customBannerSettings.StretchPicture; model.ShowBorderTop = customBannerSettings.ShowBorderTop; model.ShowBorderBottom = customBannerSettings.ShowBorderBottom; model.BorderBottomColor = customBannerSettings.BorderBottomColor; model.BorderTopColor = customBannerSettings.BorderTopColor; SiteDependingSettingHelper siteDependingSettingHelper = new SiteDependingSettingHelper(base.ViewData); siteDependingSettingHelper.GetOverrideKeys(customBannerSettings, model, siteScope, this._settingService, true); return(base.View(model)); }
public ActionResult Configure() { if (!HasPermission(false)) { return(AccessDeniedPartialView()); } var model = new ConfigurationModel(); int storeScope = this.GetActiveSiteScopeConfiguration(_services.SiteService, _services.WorkContext); var settings = _services.Settings.LoadSetting <QQExternalAuthSettings>(storeScope); model.ClientKeyIdentifier = settings.ClientKeyIdentifier; model.ClientSecret = settings.ClientSecret; var storeDependingSettingHelper = new SiteDependingSettingHelper(ViewData); storeDependingSettingHelper.GetOverrideKeys(settings, model, storeScope, _services.Settings); return(View(model)); }
public ActionResult Configure(ConfigurationModel model, FormCollection form) { if (!base.ModelState.IsValid) { return(this.Configure()); } base.ModelState.Clear(); int siteScope = ContollerExtensions.GetActiveSiteScopeConfiguration(this, this._siteService, this._workContext); CustomBannerSettings customBannerSettings = this._settingService.LoadSetting <CustomBannerSettings>(siteScope); customBannerSettings.MaxBannerHeight = model.MaxBannerHeight; customBannerSettings.StretchPicture = model.StretchPicture; customBannerSettings.BorderBottomColor = model.BorderBottomColor; customBannerSettings.BorderTopColor = model.BorderTopColor; customBannerSettings.ShowBorderBottom = model.ShowBorderBottom; customBannerSettings.ShowBorderTop = model.ShowBorderTop; SiteDependingSettingHelper siteDependingSettingHelper = new SiteDependingSettingHelper(base.ViewData); siteDependingSettingHelper.UpdateSettings(customBannerSettings, form, siteScope, this._settingService); this._settingService.ClearCache(); return(this.Configure()); }