Browse Source

Remove explicit Auto validation mode

pull/5973/head
Mladen Macanovic 6 years ago
parent
commit
b5986115a2
  1. 22
      modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/RoleManagement.razor
  2. 4
      modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor

22
modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/RoleManagement.razor

@ -14,7 +14,7 @@
<Heading Size="HeadingSize.Is1">@L["Roles"]</Heading> <Heading Size="HeadingSize.Is1">@L["Roles"]</Heading>
</Column> </Column>
<Column ColumnSize="ColumnSize.Is6"> <Column ColumnSize="ColumnSize.Is6">
@if (HasCreatePermission) @if ( HasCreatePermission )
{ {
<Paragraph Alignment="TextAlignment.Right"> <Paragraph Alignment="TextAlignment.Right">
<Button Color="Color.Primary" Clicked="OpenCreateModalAsync">@L["NewRole"]</Button> <Button Color="Color.Primary" Clicked="OpenCreateModalAsync">@L["NewRole"]</Button>
@ -31,7 +31,7 @@
ShowPager="true" ShowPager="true"
PageSize="PageSize"> PageSize="PageSize">
<DataGridColumns> <DataGridColumns>
@if (ShouldShowEntityActions) @if ( ShouldShowEntityActions )
{ {
<DataGridColumn Width="150px" TItem="IdentityRoleDto" Field="@nameof(IdentityRoleDto.Name)" Sortable="false" Caption="@L["Actions"].Value"> <DataGridColumn Width="150px" TItem="IdentityRoleDto" Field="@nameof(IdentityRoleDto.Name)" Sortable="false" Caption="@L["Actions"].Value">
<DisplayTemplate> <DisplayTemplate>
@ -40,15 +40,15 @@
@L["Actions"] @L["Actions"]
</DropdownToggle> </DropdownToggle>
<DropdownMenu> <DropdownMenu>
@if (HasUpdatePermission) @if ( HasUpdatePermission )
{ {
<DropdownItem Clicked="() => OpenEditModalAsync(context.As<IdentityRoleDto>().Id)">@L["Edit"]</DropdownItem> <DropdownItem Clicked="() => OpenEditModalAsync(context.As<IdentityRoleDto>().Id)">@L["Edit"]</DropdownItem>
} }
@if (HasManagePermissionsPermission) @if ( HasManagePermissionsPermission )
{ {
<DropdownItem Clicked="() => PermissionManagementModal.OpenAsync(PermissionProviderName, context.As<IdentityRoleDto>().Name)">@L["Permissions"]</DropdownItem> <DropdownItem Clicked="() => PermissionManagementModal.OpenAsync(PermissionProviderName, context.As<IdentityRoleDto>().Name)">@L["Permissions"]</DropdownItem>
} }
@if (HasDeletePermission) @if ( HasDeletePermission )
{ {
<DropdownItem Clicked="() => DeleteEntityAsync(context.As<IdentityRoleDto>())">@L["Delete"]</DropdownItem> <DropdownItem Clicked="() => DeleteEntityAsync(context.As<IdentityRoleDto>())">@L["Delete"]</DropdownItem>
} }
@ -60,11 +60,11 @@
<DataGridColumn TItem="IdentityRoleDto" Field="@nameof(IdentityRoleDto.Name)" Caption="@L["RoleName"].Value"> <DataGridColumn TItem="IdentityRoleDto" Field="@nameof(IdentityRoleDto.Name)" Caption="@L["RoleName"].Value">
<DisplayTemplate> <DisplayTemplate>
@(context.As<IdentityRoleDto>().Name) @(context.As<IdentityRoleDto>().Name)
@if (context.As<IdentityRoleDto>().IsDefault) @if ( context.As<IdentityRoleDto>().IsDefault )
{ {
<Badge Color="Color.Primary">@L["DisplayName:IsDefault"]</Badge> <Badge Color="Color.Primary">@L["DisplayName:IsDefault"]</Badge>
} }
@if (context.As<IdentityRoleDto>().IsPublic) @if ( context.As<IdentityRoleDto>().IsPublic )
{ {
<Badge Color="Color.Light">@L["DisplayName:IsPublic"]</Badge> <Badge Color="Color.Light">@L["DisplayName:IsPublic"]</Badge>
} }
@ -74,7 +74,7 @@
</DataGrid> </DataGrid>
@* ************************* CREATE MODAL ************************* *@ @* ************************* CREATE MODAL ************************* *@
@if (HasCreatePermission) @if ( HasCreatePermission )
{ {
<Modal @ref="CreateModal"> <Modal @ref="CreateModal">
<ModalBackdrop /> <ModalBackdrop />
@ -84,7 +84,7 @@
<CloseButton Clicked="CloseCreateModalAsync" /> <CloseButton Clicked="CloseCreateModalAsync" />
</ModalHeader> </ModalHeader>
<ModalBody> <ModalBody>
<Validations @ref="@CreateValidationsRef" Mode="ValidationMode.Auto" Model="@NewEntity" ValidateOnLoad="false"> <Validations @ref="@CreateValidationsRef" Model="@NewEntity" ValidateOnLoad="false">
<Validation MessageLocalizer="@ML.Localize"> <Validation MessageLocalizer="@ML.Localize">
<Field> <Field>
<FieldLabel>@L["DisplayName:RoleName"]</FieldLabel> <FieldLabel>@L["DisplayName:RoleName"]</FieldLabel>
@ -109,7 +109,7 @@
</Modal> </Modal>
} }
@* ************************* EDIT MODAL ************************* *@ @* ************************* EDIT MODAL ************************* *@
@if (HasUpdatePermission) @if ( HasUpdatePermission )
{ {
<Modal @ref="EditModal"> <Modal @ref="EditModal">
<ModalBackdrop /> <ModalBackdrop />
@ -119,7 +119,7 @@
<CloseButton Clicked="CloseEditModalAsync" /> <CloseButton Clicked="CloseEditModalAsync" />
</ModalHeader> </ModalHeader>
<ModalBody> <ModalBody>
<Validations @ref="@EditValidationsRef" Mode="ValidationMode.Auto" Model="@EditingEntity" ValidateOnLoad="false"> <Validations @ref="@EditValidationsRef" Model="@EditingEntity" ValidateOnLoad="false">
<input type="hidden" name="ConcurrencyStamp" @bind-value="EditingEntity.ConcurrencyStamp" /> <input type="hidden" name="ConcurrencyStamp" @bind-value="EditingEntity.ConcurrencyStamp" />
<Validation MessageLocalizer="@ML.Localize"> <Validation MessageLocalizer="@ML.Localize">
<Field> <Field>

4
modules/identity/src/Volo.Abp.Identity.Blazor/Pages/Identity/UserManagement.razor

@ -86,7 +86,7 @@
<CloseButton Clicked="CloseCreateModalAsync" /> <CloseButton Clicked="CloseCreateModalAsync" />
</ModalHeader> </ModalHeader>
<ModalBody> <ModalBody>
<Validations @ref="@CreateValidationsRef" Mode="ValidationMode.Auto" Model="@NewEntity" ValidateOnLoad="false"> <Validations @ref="@CreateValidationsRef" Model="@NewEntity" ValidateOnLoad="false">
<Tabs @bind-SelectedTab="@CreateModalSelectedTab"> <Tabs @bind-SelectedTab="@CreateModalSelectedTab">
<Items> <Items>
<Tab Name="UserInformations">@L["UserInformations"]</Tab> <Tab Name="UserInformations">@L["UserInformations"]</Tab>
@ -193,7 +193,7 @@
<CloseButton Clicked="CloseEditModalAsync" /> <CloseButton Clicked="CloseEditModalAsync" />
</ModalHeader> </ModalHeader>
<ModalBody> <ModalBody>
<Validations @ref="@EditValidationsRef" Mode="ValidationMode.Auto" Model="@NewEntity" ValidateOnLoad="false"> <Validations @ref="@EditValidationsRef" Model="@NewEntity" ValidateOnLoad="false">
<input type="hidden" name="ConcurrencyStamp" @bind-value="EditingEntity.ConcurrencyStamp" /> <input type="hidden" name="ConcurrencyStamp" @bind-value="EditingEntity.ConcurrencyStamp" />
<Tabs @bind-SelectedTab="@EditModalSelectedTab"> <Tabs @bind-SelectedTab="@EditModalSelectedTab">

Loading…
Cancel
Save