mirror of
https://github.com/bitwarden/server
synced 2026-01-06 18:43:36 +00:00
[EC-435] Admin Portal: Add new Organization creation flow UI (#2707)
* [EC-435] Created _OrganizationForm partial view. Added actions for creating an Organization assigned to a provider * [EC-435] Remove logic for creating an organization * [EC-435] Created partial view _OrganizationFormScripts * [EC-435] Remove unused ReferenceEventType * [EC-435] Added TODO comment on Organization Create * [EC-435] Checking if Provider type is Reseller on creating new assigned organization * [EC-435] Setting the Organization plan type as TeamsMonthly by default when adding to a provider * [EC-435] Removing unused buttons * [EC-435] Switched hidden fields to form submit route value * [EC-435] Moved _OrganizationForm and _OrganizationFormScripts to Shared folder * [EC-435] Moved Create organization actions from OrganizationsController to ProvidersController * [EC-435] Fixing bug on saving Organization that would have BillingEmail as null * [EC-435] Added null check to Provider * [EC-435] Moved trial buttons script logic to Edit view
This commit is contained in:
@@ -195,4 +195,24 @@ public class ProvidersController : Controller
|
||||
|
||||
return RedirectToAction("Edit", "Providers", new { id = id });
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public async Task<IActionResult> CreateOrganization(Guid providerId)
|
||||
{
|
||||
var provider = await _providerRepository.GetByIdAsync(providerId);
|
||||
if (provider is not { Type: ProviderType.Reseller })
|
||||
{
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
|
||||
return View(new OrganizationEditModel(provider));
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> CreateOrganization(Guid providerId, OrganizationEditModel model)
|
||||
{
|
||||
// TODO : Insert logic to create the new Organization entry, create an OrganizationUser entry for the owner and send the invitation email
|
||||
|
||||
return RedirectToAction("Edit", "Providers", new { id = providerId });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user