Browse Source
Merge pull request #6572 from abpframework/stsrki/dev-submit-translation
SubmitButton default translation
pull/6584/head
Halil İbrahim Kalkan
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
26 additions and
8 deletions
-
framework/src/Volo.Abp.BlazoriseUI/Components/SubmitButton.razor
-
framework/src/Volo.Abp.BlazoriseUI/Components/SubmitButton.razor.cs
-
modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/RoleManagement.razor
-
modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor
-
modules/tenant-management/src/Volo.Abp.TenantManagement.Blazor/Pages/TenantManagement/TenantManagement.razor
|
|
|
@ -1,3 +1,10 @@ |
|
|
|
<Button form="@Form" Type="@Type" Color="@Color" Block="@Block" PreventDefaultOnSubmit="@PreventDefaultOnSubmit" Disabled="@IsDisabled" Loading="@IsLoading" Clicked="@OnClickedHandler"> |
|
|
|
@ChildContent |
|
|
|
@if ( ChildContent != null ) |
|
|
|
{ |
|
|
|
@ChildContent |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
@SaveString |
|
|
|
} |
|
|
|
</Button> |
|
|
|
|
|
|
|
@ -1,7 +1,9 @@ |
|
|
|
using System; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Blazorise; |
|
|
|
using Localization.Resources.AbpUi; |
|
|
|
using Microsoft.AspNetCore.Components; |
|
|
|
using Microsoft.Extensions.Localization; |
|
|
|
|
|
|
|
namespace Volo.Abp.BlazoriseUI.Components |
|
|
|
{ |
|
|
|
@ -27,18 +29,27 @@ namespace Volo.Abp.BlazoriseUI.Components |
|
|
|
[Parameter] |
|
|
|
public bool? Disabled { get; set; } |
|
|
|
|
|
|
|
[Parameter] |
|
|
|
public string SaveResourceKey { get; set; } = "Save"; |
|
|
|
|
|
|
|
[Parameter] |
|
|
|
public EventCallback Clicked { get; set; } |
|
|
|
|
|
|
|
[Parameter] |
|
|
|
public RenderFragment ChildContent { get; set; } |
|
|
|
|
|
|
|
[Inject] |
|
|
|
protected IStringLocalizer<AbpUiResource> StringLocalizer { get; set; } |
|
|
|
|
|
|
|
protected bool IsDisabled |
|
|
|
=> Disabled == true || Submiting; |
|
|
|
|
|
|
|
protected bool IsLoading |
|
|
|
=> Submiting; |
|
|
|
|
|
|
|
protected string SaveString |
|
|
|
=> StringLocalizer[SaveResourceKey]; |
|
|
|
|
|
|
|
protected virtual async Task OnClickedHandler() |
|
|
|
{ |
|
|
|
try |
|
|
|
|
|
|
|
@ -104,7 +104,7 @@ |
|
|
|
</ModalBody> |
|
|
|
<ModalFooter> |
|
|
|
<Button Color="Color.Secondary" Clicked="CloseCreateModalAsync">@L["Cancel"]</Button> |
|
|
|
<SubmitButton Form="RoleCreateForm" Clicked="@CreateEntityAsync">@L["Save"]</SubmitButton> |
|
|
|
<SubmitButton Form="RoleCreateForm" Clicked="@CreateEntityAsync" /> |
|
|
|
</ModalFooter> |
|
|
|
</Form> |
|
|
|
</ModalContent> |
|
|
|
@ -142,7 +142,7 @@ |
|
|
|
</ModalBody> |
|
|
|
<ModalFooter> |
|
|
|
<Button Color="Color.Secondary" Clicked="CloseEditModalAsync">@L["Cancel"]</Button> |
|
|
|
<SubmitButton Form="RoleEditForm" Clicked="@UpdateEntityAsync">@L["Save"]</SubmitButton> |
|
|
|
<SubmitButton Form="RoleEditForm" Clicked="@UpdateEntityAsync" /> |
|
|
|
</ModalFooter> |
|
|
|
</Form> |
|
|
|
</ModalContent> |
|
|
|
|
|
|
|
@ -176,7 +176,7 @@ |
|
|
|
</ModalBody> |
|
|
|
<ModalFooter> |
|
|
|
<Button Color="Color.Secondary" Clicked="CloseCreateModalAsync">@L["Cancel"]</Button> |
|
|
|
<SubmitButton Form="UserCreateForm" Clicked="@CreateEntityAsync">@L["Save"]</SubmitButton> |
|
|
|
<SubmitButton Form="UserCreateForm" Clicked="@CreateEntityAsync" /> |
|
|
|
</ModalFooter> |
|
|
|
</Form> |
|
|
|
</ModalContent> |
|
|
|
@ -287,7 +287,7 @@ |
|
|
|
</ModalBody> |
|
|
|
<ModalFooter> |
|
|
|
<Button Color="Color.Secondary" Clicked="CloseEditModalAsync">@L["Cancel"]</Button> |
|
|
|
<SubmitButton Form="UserEditForm" Clicked="@UpdateEntityAsync">@L["Save"]</SubmitButton> |
|
|
|
<SubmitButton Form="UserEditForm" Clicked="@UpdateEntityAsync" /> |
|
|
|
</ModalFooter> |
|
|
|
</Form> |
|
|
|
</ModalContent> |
|
|
|
|
|
|
|
@ -114,7 +114,7 @@ |
|
|
|
</ModalBody> |
|
|
|
<ModalFooter> |
|
|
|
<Button Color="Color.Secondary" Clicked="CloseCreateModalAsync">@L["Cancel"]</Button> |
|
|
|
<SubmitButton Form="TenantCreateForm" Clicked="@CreateEntityAsync">@L["Save"]</SubmitButton> |
|
|
|
<SubmitButton Form="TenantCreateForm" Clicked="@CreateEntityAsync" /> |
|
|
|
</ModalFooter> |
|
|
|
</Form> |
|
|
|
</ModalContent> |
|
|
|
@ -148,7 +148,7 @@ |
|
|
|
</ModalBody> |
|
|
|
<ModalFooter> |
|
|
|
<Button Color="Color.Secondary" Clicked="CloseEditModalAsync">@L["Cancel"]</Button> |
|
|
|
<SubmitButton Form="TenantEditForm" Clicked="@UpdateEntityAsync">@L["Save"]</SubmitButton> |
|
|
|
<SubmitButton Form="TenantEditForm" Clicked="@UpdateEntityAsync" /> |
|
|
|
</ModalFooter> |
|
|
|
</Form> |
|
|
|
</ModalContent> |
|
|
|
@ -187,7 +187,7 @@ |
|
|
|
</ModalBody> |
|
|
|
<ModalFooter> |
|
|
|
<Button Color="Color.Secondary" Clicked="CloseEditConnectionStringModal">@L["Cancel"]</Button> |
|
|
|
<SubmitButton Form="ConnectionStringEditForm" Clicked="@UpdateConnectionStringAsync">@L["Save"]</SubmitButton> |
|
|
|
<SubmitButton Form="ConnectionStringEditForm" Clicked="@UpdateConnectionStringAsync" /> |
|
|
|
</ModalFooter> |
|
|
|
</Form> |
|
|
|
</ModalContent> |
|
|
|
|