diff --git a/src/Admin/Views/Organizations/Edit.cshtml b/src/Admin/Views/Organizations/Edit.cshtml index 2d5aa1aed5..e4c329007c 100644 --- a/src/Admin/Views/Organizations/Edit.cshtml +++ b/src/Admin/Views/Organizations/Edit.cshtml @@ -20,60 +20,16 @@ alert('Organization is not on a free plan.'); return; } - // Plan - document.getElementById('@(nameof(Model.PlanType))').value = '@((byte)Bit.Core.Enums.PlanType.TeamsAnnually)'; + togglePlanSettings('@((byte)Bit.Core.Enums.PlanType.TeamsAnnually)'); document.getElementById('@(nameof(Model.Plan))').value = 'Teams (Trial)'; - document.getElementById('@(nameof(Model.Seats))').value = '10'; - document.getElementById('@(nameof(Model.MaxCollections))').value = ''; - document.getElementById('@(nameof(Model.MaxStorageGb))').value = '1'; - // Features - document.getElementById('@(nameof(Model.UsePolicies))').checked = false; - document.getElementById('@(nameof(Model.UseSso))').checked = false; - document.getElementById('@(nameof(Model.UseGroups))').checked = true; - document.getElementById('@(nameof(Model.UseDirectory))').checked = true; - document.getElementById('@(nameof(Model.UseEvents))').checked = true; - document.getElementById('@(nameof(Model.UsersGetPremium))').checked = true; - document.getElementById('@(nameof(Model.UseCustomPermissions))').checked = false; - document.getElementById('@(nameof(Model.UseTotp))').checked = true; - document.getElementById('@(nameof(Model.Use2fa))').checked = true; - document.getElementById('@(nameof(Model.UseApi))').checked = true; - document.getElementById('@(nameof(Model.SelfHost))').checked = false; - document.getElementById('@(nameof(Model.UseResetPassword))').checked = false; - document.getElementById('@(nameof(Model.UseScim))').checked = false; - // Licensing - document.getElementById('@(nameof(Model.LicenseKey))').value = '@Model.RandomLicenseKey'; - document.getElementById('@(nameof(Model.ExpirationDate))').value = '@Model.FourteenDayExpirationDate'; - document.getElementById('@(nameof(Model.SalesAssistedTrialStarted))').value = true; }); document.getElementById('enterprise-trial').addEventListener('click', () => { if (document.getElementById('@(nameof(Model.PlanType))').value !== '@((byte)Bit.Core.Enums.PlanType.Free)') { alert('Organization is not on a free plan.'); return; } - // Plan - document.getElementById('@(nameof(Model.PlanType))').value = '@((byte)Bit.Core.Enums.PlanType.EnterpriseAnnually)'; + togglePlanSettings('@((byte)Bit.Core.Enums.PlanType.EnterpriseAnnually)'); document.getElementById('@(nameof(Model.Plan))').value = 'Enterprise (Trial)'; - document.getElementById('@(nameof(Model.Seats))').value = '10'; - document.getElementById('@(nameof(Model.MaxCollections))').value = ''; - document.getElementById('@(nameof(Model.MaxStorageGb))').value = '1'; - // Features - document.getElementById('@(nameof(Model.UsePolicies))').checked = true; - document.getElementById('@(nameof(Model.UseSso))').checked = true; - document.getElementById('@(nameof(Model.UseGroups))').checked = true; - document.getElementById('@(nameof(Model.UseDirectory))').checked = true; - document.getElementById('@(nameof(Model.UseEvents))').checked = true; - document.getElementById('@(nameof(Model.UsersGetPremium))').checked = true; - document.getElementById('@(nameof(Model.UseCustomPermissions))').checked = true; - document.getElementById('@(nameof(Model.UseTotp))').checked = true; - document.getElementById('@(nameof(Model.Use2fa))').checked = true; - document.getElementById('@(nameof(Model.UseApi))').checked = true; - document.getElementById('@(nameof(Model.SelfHost))').checked = true; - document.getElementById('@(nameof(Model.UseResetPassword))').checked = true; - document.getElementById('@(nameof(Model.UseScim))').checked = true; - // Licensing - document.getElementById('@(nameof(Model.LicenseKey))').value = '@Model.RandomLicenseKey'; - document.getElementById('@(nameof(Model.ExpirationDate))').value = '@Model.FourteenDayExpirationDate'; - document.getElementById('@(nameof(Model.SalesAssistedTrialStarted))').value = true; }); })(); diff --git a/src/Admin/Views/Providers/CreateOrganization.cshtml b/src/Admin/Views/Providers/CreateOrganization.cshtml index 219b6854b9..2257f6e334 100644 --- a/src/Admin/Views/Providers/CreateOrganization.cshtml +++ b/src/Admin/Views/Providers/CreateOrganization.cshtml @@ -5,6 +5,12 @@ @section Scripts { @await Html.PartialAsync("_OrganizationFormScripts") + + }