|
|
|
@ -1,10 +1,19 @@ |
|
|
|
using System.Text; |
|
|
|
using Microsoft.AspNetCore.Razor.TagHelpers; |
|
|
|
using Microsoft.Extensions.Localization; |
|
|
|
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Localization.Resource; |
|
|
|
|
|
|
|
namespace Volo.Abp.AspNetCore.Mvc.TagHelpers |
|
|
|
namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers |
|
|
|
{ |
|
|
|
public class AbpModalFooterTagHelper : TagHelper |
|
|
|
{ |
|
|
|
private readonly IStringLocalizer<AbpBootstrapResource> _localizer; |
|
|
|
|
|
|
|
public AbpModalFooterTagHelper(IStringLocalizer<AbpBootstrapResource> localizer) |
|
|
|
{ |
|
|
|
_localizer = localizer; |
|
|
|
} |
|
|
|
|
|
|
|
public override void Process(TagHelperContext context, TagHelperOutput output) |
|
|
|
{ |
|
|
|
output.TagName = "div"; |
|
|
|
@ -16,8 +25,8 @@ namespace Volo.Abp.AspNetCore.Mvc.TagHelpers |
|
|
|
{ |
|
|
|
var sb = new StringBuilder(); |
|
|
|
|
|
|
|
sb.AppendLine("<button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">Cancel</button>"); |
|
|
|
sb.AppendLine("<button type=\"submit\" class=\"btn btn-primary\" id=\"btnUpdateUserSave\">Save</button>"); |
|
|
|
sb.AppendLine("<button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">" + _localizer["Close"] + "</button>"); |
|
|
|
sb.AppendLine("<button type=\"submit\" class=\"btn btn-primary\" id=\"btnUpdateUserSave\">" + _localizer["Save"] + "</button>"); |
|
|
|
|
|
|
|
return sb.ToString(); |
|
|
|
} |