Skip to content

Commit

Permalink
Merge branch 'rel-8.1' of https://github.com/abpframework/abp into re…
Browse files Browse the repository at this point in the history
…l-8.1
  • Loading branch information
voloagent committed May 13, 2024
2 parents ae58e40 + 58bc2a0 commit 8fe4c6d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Expand Up @@ -43,6 +43,7 @@
@for (var j = 0; j < featureGroup.Features.Count; j++)
{
var feature = featureGroup.Features[j];
var disabled = Model.IsDisabled(feature.Provider.Name);
<div class="mt-2">

<input type="text" abp-id-name="@Model.FeatureGroups[i].Features[j].Type" value="@feature.ValueType?.Name" hidden/>
Expand All @@ -53,6 +54,7 @@
type="checkbox"
abp-id-name="@Model.FeatureGroups[i].Features[j].BoolValue"
label="@feature.DisplayName"
disabled="@disabled"
group-data-feature-name="@feature.Name"
group-data-parent-name="@(feature.ParentName ?? "")"
group-style="margin-inline-start: @(feature.Depth * 20)px"/>
Expand All @@ -74,6 +76,7 @@
<abp-input asp-for="@feature.Value"
label="@feature.DisplayName"
abp-id-name="@Model.FeatureGroups[i].Features[j].Value"
disabled="@disabled"
type="@type"
group-data-feature-name="@feature.Name"
group-data-parent-name="@(feature.ParentName ?? "")"
Expand Down
Expand Up @@ -77,6 +77,11 @@ public virtual async Task<IActionResult> OnPostAsync()
return NoContent();
}

public virtual bool IsDisabled(string providerName)
{
return providerName != ProviderName && providerName != DefaultValueFeatureValueProvider.ProviderName;
}

public class FeatureGroupViewModel
{
public List<FeatureViewModel> Features { get; set; }
Expand Down

0 comments on commit 8fe4c6d

Please sign in to comment.