minor refactoring in tag-helpers

pull/279/head
yekalkan 7 years ago
parent 00e3ed3512
commit 0db27c895b

@ -47,11 +47,8 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
SetFormAttributes(output); SetFormAttributes(output);
if (TagHelper.SubmitButton ?? false)
{
SetSubmitButton(context, output); SetSubmitButton(context, output);
} }
}
protected virtual async Task ConvertToMvcForm(TagHelperContext context, TagHelperOutput output) protected virtual async Task ConvertToMvcForm(TagHelperContext context, TagHelperOutput output)
{ {
@ -103,6 +100,11 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form
protected virtual void SetSubmitButton(TagHelperContext context, TagHelperOutput output) protected virtual void SetSubmitButton(TagHelperContext context, TagHelperOutput output)
{ {
if (TagHelper.SubmitButton ?? false)
{
return;
}
var buttonHtml = ProcessSubmitButtonAndGetContent(context, output); var buttonHtml = ProcessSubmitButtonAndGetContent(context, output);
output.PostContent.SetHtmlContent(output.PostContent.GetContent() + buttonHtml); output.PostContent.SetHtmlContent(output.PostContent.GetContent() + buttonHtml);

Loading…
Cancel
Save