1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-25 12:45:18 +01:00

[AC-1637] Modified views in Admin project to decode values to display

This commit is contained in:
Rui Tome 2023-09-26 15:20:10 +01:00
parent 6dadcbed21
commit 6bbc956337
No known key found for this signature in database
GPG Key ID: 526239D96A8EC066
4 changed files with 8 additions and 7 deletions

View File

@ -2,7 +2,7 @@
@inject Bit.Admin.Services.IAccessControlService AccessControlService
@model OrganizationEditModel
@{
ViewData["Title"] = (Model.Provider != null ? "Client " : string.Empty) + "Organization: " + Model.Organization.Name;
ViewData["Title"] = (Model.Provider != null ? "Client " : string.Empty) + "Organization: " + Html.Raw(Model.Name);
var canViewOrganizationInformation = AccessControlService.UserHasPermission(Permission.Org_OrgInformation_View);
var canViewBillingInformation = AccessControlService.UserHasPermission(Permission.Org_BillingInformation_View);
@ -55,7 +55,7 @@
</script>
}
<h1>@(Model.Provider != null ? "Client " : string.Empty)Organization <small>@Model.Organization.Name</small></h1>
<h1>@(Model.Provider != null ? "Client " : string.Empty)Organization <small>@Html.Raw(Model.Name)</small></h1>
@if (Model.Provider != null)
{

View File

@ -46,7 +46,7 @@
{
<tr>
<td>
<a asp-action="@Model.Action" asp-route-id="@org.Id">@org.Name</a>
<a asp-action="@Model.Action" asp-route-id="@org.Id">@Html.Raw(org.Name)</a>
</td>
<td>
@org.Plan

View File

@ -1,10 +1,10 @@
@inject Bit.Core.Settings.GlobalSettings GlobalSettings
@model OrganizationViewModel
@{
ViewData["Title"] = "Organization: " + Model.Organization.Name;
ViewData["Title"] = "Organization: " + Html.Raw(Model.Organization.Name);
}
<h1>Organization <small>@Model.Organization.Name</small></h1>
<h1>Organization <small>@Html.Raw(Model.Organization.Name)</small></h1>
@if (Model.Provider != null)
{

View File

@ -1,5 +1,6 @@
@using Bit.SharedWeb.Utilities
@using Bit.Admin.Enums;
@using System.Web
@inject Bit.Admin.Services.IAccessControlService AccessControlService;
@model OrganizationEditModel
@ -26,7 +27,7 @@
<div class="col-sm">
<div class="form-group">
<label asp-for="Name"></label>
<input type="text" class="form-control" asp-for="Name" required>
<input type="text" class="form-control" asp-for="Name" value="@HttpUtility.HtmlDecode(Model.Name)" required>
</div>
</div>
</div>
@ -66,7 +67,7 @@
<div class="col-sm">
<div class="form-group">
<label asp-for="BusinessName"></label>
<input type="text" class="form-control" asp-for="BusinessName">
<input type="text" class="form-control" asp-for="BusinessName" value="@HttpUtility.HtmlDecode(Model.BusinessName)">
</div>
</div>
</div>