|
|
|
@ -11,75 +11,80 @@
|
|
|
|
|
<CloseButton Clicked="CloseModal" />
|
|
|
|
|
</ModalHeader>
|
|
|
|
|
<ModalBody MaxHeight="50">
|
|
|
|
|
@if (_groups == null)
|
|
|
|
|
{
|
|
|
|
|
<span>@L["NoFeatureFoundMessage"]</span>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<Tabs TabPosition="TabPosition.Left" Pills="true" SelectedTab="@GetNormalizedGroupName(_groups.First().Name)">
|
|
|
|
|
<Items>
|
|
|
|
|
@foreach (var group in _groups)
|
|
|
|
|
{
|
|
|
|
|
<Tab Name="@GetNormalizedGroupName(group.Name)">
|
|
|
|
|
<span>@group.DisplayName</span>
|
|
|
|
|
</Tab>
|
|
|
|
|
}
|
|
|
|
|
</Items>
|
|
|
|
|
<Content>
|
|
|
|
|
@foreach (var group in _groups)
|
|
|
|
|
{
|
|
|
|
|
<TabPanel Name="@GetNormalizedGroupName(group.Name)">
|
|
|
|
|
<h4>@group.DisplayName</h4>
|
|
|
|
|
|
|
|
|
|
@foreach (var feature in group.Features)
|
|
|
|
|
{
|
|
|
|
|
var disabled = IsDisabled(feature.Provider.Name);
|
|
|
|
|
<EditForm id="UpdateFeaturesForm" OnValidSubmit="SaveAsync">
|
|
|
|
|
@if (_groups == null)
|
|
|
|
|
{
|
|
|
|
|
<span>@L["NoFeatureFoundMessage"]</span>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<Tabs TabPosition="TabPosition.Left" Pills="true" SelectedTab="@GetNormalizedGroupName(_groups.First().Name)">
|
|
|
|
|
<Items>
|
|
|
|
|
@foreach (var group in _groups)
|
|
|
|
|
{
|
|
|
|
|
<Tab Name="@GetNormalizedGroupName(group.Name)">
|
|
|
|
|
<span>@group.DisplayName</span>
|
|
|
|
|
</Tab>
|
|
|
|
|
}
|
|
|
|
|
</Items>
|
|
|
|
|
<Content>
|
|
|
|
|
@foreach (var group in _groups)
|
|
|
|
|
{
|
|
|
|
|
<TabPanel Name="@GetNormalizedGroupName(group.Name)">
|
|
|
|
|
<h4>@group.DisplayName</h4>
|
|
|
|
|
|
|
|
|
|
if (feature.ValueType is FreeTextStringValueType)
|
|
|
|
|
@foreach (var feature in group.Features)
|
|
|
|
|
{
|
|
|
|
|
<Field>
|
|
|
|
|
<FieldLabel>@feature.DisplayName</FieldLabel>
|
|
|
|
|
<TextEdit Disabled="@disabled" @bind-text="@feature.Value" />
|
|
|
|
|
@if (feature.Description != null)
|
|
|
|
|
{
|
|
|
|
|
<span>@feature.Description</span>
|
|
|
|
|
}
|
|
|
|
|
</Field>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (feature.ValueType is SelectionStringValueType)
|
|
|
|
|
{
|
|
|
|
|
var items = ((SelectionStringValueType) feature.ValueType).ItemSource.Items;
|
|
|
|
|
var disabled = IsDisabled(feature.Provider.Name);
|
|
|
|
|
|
|
|
|
|
<Field>
|
|
|
|
|
<FieldLabel>@feature.DisplayName</FieldLabel>
|
|
|
|
|
<Select TValue="string" SelectedValue="feature.Value">
|
|
|
|
|
@foreach (var item in items)
|
|
|
|
|
if (feature.ValueType is FreeTextStringValueType)
|
|
|
|
|
{
|
|
|
|
|
<Field>
|
|
|
|
|
<FieldLabel>@feature.DisplayName</FieldLabel>
|
|
|
|
|
<TextEdit
|
|
|
|
|
Disabled="@disabled"
|
|
|
|
|
Text="@feature.Value"
|
|
|
|
|
TextChanged="@(async(v) => await OnFeatureValueChangedAsync(v, feature))" />
|
|
|
|
|
@if (feature.Description != null)
|
|
|
|
|
{
|
|
|
|
|
<SelectItem Value="@item.Value">@item.DisplayText</SelectItem>
|
|
|
|
|
<span>@feature.Description</span>
|
|
|
|
|
}
|
|
|
|
|
</Select>
|
|
|
|
|
</Field>
|
|
|
|
|
</Field>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (feature.ValueType is SelectionStringValueType)
|
|
|
|
|
{
|
|
|
|
|
var items = ((SelectionStringValueType) feature.ValueType).ItemSource.Items;
|
|
|
|
|
|
|
|
|
|
<Field>
|
|
|
|
|
<FieldLabel>@feature.DisplayName</FieldLabel>
|
|
|
|
|
<Select TValue="string" SelectedValue="feature.Value">
|
|
|
|
|
@foreach (var item in items)
|
|
|
|
|
{
|
|
|
|
|
<SelectItem Value="@item.Value">@item.DisplayText</SelectItem>
|
|
|
|
|
}
|
|
|
|
|
</Select>
|
|
|
|
|
</Field>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (feature.ValueType is ToggleStringValueType)
|
|
|
|
|
{
|
|
|
|
|
<Field>
|
|
|
|
|
<Check TValue="bool" @bind-checked="@_toggleValues[feature.Name]">@feature.DisplayName</Check>
|
|
|
|
|
</Field>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (feature.ValueType is ToggleStringValueType)
|
|
|
|
|
{
|
|
|
|
|
<Field>
|
|
|
|
|
<Check TValue="bool" @bind-checked="@ToggleValues[feature.Name]">@feature.DisplayName</Check>
|
|
|
|
|
</Field>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</TabPanel>
|
|
|
|
|
}
|
|
|
|
|
</Content>
|
|
|
|
|
</Tabs>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</TabPanel>
|
|
|
|
|
}
|
|
|
|
|
</Content>
|
|
|
|
|
</Tabs>
|
|
|
|
|
}
|
|
|
|
|
</EditForm>
|
|
|
|
|
</ModalBody>
|
|
|
|
|
<ModalFooter>
|
|
|
|
|
<Button Color="Color.Secondary" Clicked="CloseModal">@L["Cancel"]</Button>
|
|
|
|
|
<Button Color="Color.Primary" Clicked="SaveAsync">@L["Save"]</Button>
|
|
|
|
|
<Button form="UpdateFeaturesForm" Color="Color.Primary" Clicked="SaveAsync">@L["Save"]</Button>
|
|
|
|
|
</ModalFooter>
|
|
|
|
|
</ModalContent>
|
|
|
|
|
</Modal>
|