mirror of https://github.com/abpframework/abp.git
3 changed files with 50 additions and 3 deletions
@ -0,0 +1,16 @@ |
|||||
|
using JetBrains.Annotations; |
||||
|
|
||||
|
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form |
||||
|
{ |
||||
|
public class AbpFormGroupTagHelper : AbpTagHelper<AbpFormGroupTagHelper, AbpFormGroupTagHelperService> |
||||
|
{ |
||||
|
|
||||
|
public bool Checkbox { get; set; } |
||||
|
|
||||
|
public AbpFormGroupTagHelper(AbpFormGroupTagHelperService tagHelperService) |
||||
|
: base(tagHelperService) |
||||
|
{ |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,19 @@ |
|||||
|
using System.Text; |
||||
|
using Microsoft.AspNetCore.Razor.TagHelpers; |
||||
|
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Microsoft.AspNetCore.Razor.TagHelpers; |
||||
|
|
||||
|
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form |
||||
|
{ |
||||
|
public class AbpFormGroupTagHelperService : AbpTagHelperService<AbpFormGroupTagHelper> |
||||
|
{ |
||||
|
public override void Process(TagHelperContext context, TagHelperOutput output) |
||||
|
{ |
||||
|
output.TagName = "div"; |
||||
|
output.Attributes.AddClass("form-group"); |
||||
|
if (TagHelper.Checkbox) |
||||
|
{ |
||||
|
output.Attributes.AddClass("form-check"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue