Browse Source

Simplify usage of SetHtmlContent to AppendHtml

pull/8782/head
Aaron Chong 5 years ago
parent
commit
f2e46d3b25
  1. 6
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpDynamicformTagHelperService.cs
  2. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelperService.cs

6
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpDynamicformTagHelperService.cs

@ -78,8 +78,8 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
await formTagOutput.GetChildContentAsync();
output.PostContent.SetHtmlContent(output.PostContent.GetContent() + formTagOutput.PostContent.GetContent());
output.PreContent.SetHtmlContent(output.PreContent.GetContent() + formTagOutput.PreContent.GetContent());
output.PostContent.AppendHtml(formTagOutput.PostContent);
output.PreContent.AppendHtml(formTagOutput.PreContent);
}
protected virtual void NormalizeTagMode(TagHelperContext context, TagHelperOutput output)
@ -123,7 +123,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
var buttonHtml = await ProcessSubmitButtonAndGetContentAsync(context, output);
output.PostContent.SetHtmlContent(output.PostContent.GetContent() + buttonHtml);
output.PostContent.AppendHtml(buttonHtml);
}
protected virtual List<FormGroupItem> InitilizeFormGroupContentsContext(TagHelperContext context, TagHelperOutput output)

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelperService.cs

@ -52,7 +52,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
output.Attributes.AddClass(isCheckBox ? "custom-checkbox" : "form-group");
output.Attributes.AddClass(isCheckBox ? "custom-control" : "");
output.Attributes.AddClass(isCheckBox ? "mb-2" : "");
output.Content.SetHtmlContent(output.Content.GetContent() + innerHtml);
output.Content.AppendHtml(innerHtml);
}
}

Loading…
Cancel
Save