();
+
+ public string RestartUrl { get; set; }
}
}
\ No newline at end of file
diff --git a/src/Presentation/Nop.Web/Views/Install/Index.cshtml b/src/Presentation/Nop.Web/Views/Install/Index.cshtml
index 3cddcd822e6..c6980ef59d1 100644
--- a/src/Presentation/Nop.Web/Views/Install/Index.cshtml
+++ b/src/Presentation/Nop.Web/Views/Install/Index.cshtml
@@ -72,7 +72,7 @@
$(document).ready(function () {
$('#restart-form').submit(function () {
$("html, body").animate({ scrollTop: 0 }, 400);
- showThrobber('@Html.Raw(JavaScriptEncoder.Default.Encode("Restarting..."))');
+ showThrobber('@Html.Raw(JavaScriptEncoder.Default.Encode(ILS.GetResource("RestartProgress")))');
$('input[type=submit]', this).attr('disabled', 'disabled');
});
});
@@ -92,7 +92,7 @@
if(!integratedSecurityProviders.includes($(this).val())) {
$('#@Html.IdFor(x => x.IntegratedSecurity)').prop('checked', false);
$('#@Html.IdFor(x => x.IntegratedSecurity)').prop('disabled', true)
-
+
toggleSqlAuthenticationType();
} else {
$('#@Html.IdFor(x => x.IntegratedSecurity)').prop('disabled', false)
@@ -112,7 +112,7 @@
}
function toggleCollation() {
-
+
var connectionStringRaw = $("#@Html.IdFor(x => x.UseCustomCollation)").is(':checked');
var collationInput = $("#@Html.IdFor(x => x.Collation)")
if (connectionStringRaw) {
@@ -121,6 +121,24 @@
collationInput.hide();
}
}
+
+ @if (!string.IsNullOrEmpty(Model.RestartUrl))
+ {
+
+ $(document).ready(function () {
+ showThrobber('@Html.Raw(JavaScriptEncoder.Default.Encode(ILS.GetResource("RestartProgress")))');
+ $.ajax({
+ type: "GET",
+ url: "@Url.Action("RestartApplication", "Install")",
+ complete: function() {
+ window.setTimeout(function () {
+ window.location.replace('@Model.RestartUrl');
+ }, @NopCommonDefaults.RestartTimeout);
+ }
+ });
+ });
+
+ }
diff --git a/src/Presentation/Nop.Web/Views/Install/_ViewImports.cshtml b/src/Presentation/Nop.Web/Views/Install/_ViewImports.cshtml
index 707e332a643..30f16ad5e39 100644
--- a/src/Presentation/Nop.Web/Views/Install/_ViewImports.cshtml
+++ b/src/Presentation/Nop.Web/Views/Install/_ViewImports.cshtml
@@ -4,5 +4,6 @@
@inject IInstallationLocalizationService ILS
@using Nop.Data
+@using Nop.Services.Common
@using Nop.Web.Models.Install
@using Nop.Web.Infrastructure.Installation
\ No newline at end of file
diff --git a/upgradescripts/4.20-4.30 (under development)/upgrade.sql b/upgradescripts/4.20-4.30 (under development)/upgrade.sql
index 910c6d6b40c..007a5a20184 100644
--- a/upgradescripts/4.20-4.30 (under development)/upgrade.sql
+++ b/upgradescripts/4.20-4.30 (under development)/upgrade.sql
@@ -3299,4 +3299,12 @@ BEGIN
INSERT [Setting] ([Name], [Value], [StoreId])
VALUES (N'avalarataxsettings.enablelogging', N'True', 0)
END
+GO
+
+--new setting
+IF NOT EXISTS (SELECT 1 FROM [Setting] WHERE [Name] = N'commonsettings.restarttimeout')
+BEGIN
+ INSERT [Setting] ([Name], [Value], [StoreId])
+ VALUES (N'commonsettings.restarttimeout', N'3000', 0)
+END
GO
\ No newline at end of file