Browse Source

Remove unnecessary Display properties.

pull/400/head
Halil ibrahim Kalkan 8 years ago
parent
commit
2fa6679fc5
  1. 2
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpDataAnnotationAutoLocalizationMetadataDetailsProvider.cs
  2. 9
      modules/identity/src/Volo.Abp.Identity.Web/Localization/Resources/AbpIdentity/en.json
  3. 9
      modules/identity/src/Volo.Abp.Identity.Web/Localization/Resources/AbpIdentity/tr.json
  4. 2
      modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/CreateModal.cshtml
  5. 2
      modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/CreateModal.cshtml.cs
  6. 2
      modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/EditModal.cshtml
  7. 2
      modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/EditModal.cshtml.cs
  8. 6
      modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml.cs
  9. 12
      modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml
  10. 5
      modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml.cs

2
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpDataAnnotationAutoLocalizationMetadataDetailsProvider.cs

@ -12,7 +12,7 @@ namespace Volo.Abp.AspNetCore.Mvc
{
public class AbpDataAnnotationAutoLocalizationMetadataDetailsProvider : IDisplayMetadataProvider
{
private const string PropertyLocalizationKeyPrefix = "Property:";
private const string PropertyLocalizationKeyPrefix = "DisplayName:";
private readonly Lazy<IStringLocalizerFactory> _stringLocalizerFactory;
private readonly Lazy<IOptions<MvcDataAnnotationsLocalizationOptions>> _localizationOptions;

9
modules/identity/src/Volo.Abp.Identity.Web/Localization/Resources/AbpIdentity/en.json

@ -12,8 +12,13 @@
"Password": "Password",
"UserDeletionConfirmationMessage": "User '{0}' will be deleted. Do you confirm that?",
"RoleDeletionConfirmationMessage": "Role '{0}' will be deleted. Do you confirm that?",
"TwoFactorVerification": "Two factor verification",
"AccountLockoutOnFailedLoginAttempts": "Locking account after failed login attempts",
"DisplayName:RoleName": "Role name",
"DisplayName:UserName": "User name",
"DisplayName:Password": "Password",
"DisplayName:EmailAddress": "Email address",
"DisplayName:PhoneNumber": "Phone number",
"DisplayName:TwoFactorEnabled": "Two factor verification",
"DisplayName:LockoutEnabled": "Locking account after failed login attempts",
"NewRole": "New role",
"RoleName": "Role name",
"CreationTime": "Creation time",

9
modules/identity/src/Volo.Abp.Identity.Web/Localization/Resources/AbpIdentity/tr.json

@ -12,8 +12,13 @@
"Password": "Şifre",
"UserDeletionConfirmationMessage": "{0} kullanıcısı silinecektir. Onaylıyor musunuz?",
"RoleDeletionConfirmationMessage": "'{0}' rolü silinecektir. Onaylıyor musunuz?",
"TwoFactorVerification": "İki aşamalı doğrumala",
"AccountLockoutOnFailedLoginAttempts": "Başarısız giriş denemeleri sonrası hesabı kilitleme",
"DisplayName:RoleName": "Rol adı",
"DisplayName:UserName": "Kullanıcı adı",
"DisplayName:Password": "Şifre",
"DisplayName:EmailAddress": "E-posta adresi",
"DisplayName:PhoneNumber": "Telefon numarası",
"DisplayName:TwoFactorEnabled": "İki aşamalı doğrumala",
"DisplayName:LockoutEnabled": "Başarısız giriş denemeleri sonrası hesabı kilitleme",
"NewRole": "Yeni rol",
"RoleName": "Rol adı",
"CreationTime": "Oluşturma zamanı",

2
modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/CreateModal.cshtml

@ -11,7 +11,7 @@
<abp-modal>
<abp-modal-header title="@L["NewRole"].Value"></abp-modal-header>
<abp-modal-body>
<abp-input asp-for="Role.Name" label="@L["RoleName"].Value" />
<abp-input asp-for="Role.Name" />
</abp-modal-body>
<abp-modal-footer buttons="@(AbpModalButtons.Cancel|AbpModalButtons.Save)"></abp-modal-footer>
</abp-modal>

2
modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/CreateModal.cshtml.cs

@ -31,7 +31,7 @@ namespace Volo.Abp.Identity.Web.Pages.Identity.Roles
{
[Required]
[StringLength(IdentityRoleConsts.MaxNameLength)]
[Display(Name = "RoleName")]
[Display(Name = "DisplayName:RoleName")]
public string Name { get; set; }
}
}

2
modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/EditModal.cshtml

@ -12,7 +12,7 @@
<abp-modal-header title="@L["Edit"].Value"></abp-modal-header>
<abp-modal-body>
<input asp-for="Role.Id" />
<abp-input asp-for="Role.Name" label="@L["RoleName"].Value" />
<abp-input asp-for="Role.Name" />
</abp-modal-body>
<abp-modal-footer buttons="@(AbpModalButtons.Cancel|AbpModalButtons.Save)"></abp-modal-footer>
</abp-modal>

2
modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/EditModal.cshtml.cs

@ -42,7 +42,7 @@ namespace Volo.Abp.Identity.Web.Pages.Identity.Roles
[Required]
[StringLength(IdentityRoleConsts.MaxNameLength)]
[Display(Name = "RoleName")]
[Display(Name = "DisplayName:RoleName")]
public string Name { get; set; }
}
}

6
modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml.cs

@ -49,29 +49,23 @@ namespace Volo.Abp.Identity.Web.Pages.Identity.Users
{
[Required]
[StringLength(IdentityUserConsts.MaxUserNameLength)]
[Display(Name = "UserName")]
public string UserName { get; set; }
[Required]
[StringLength(IdentityUserConsts.MaxPasswordLength)]
[DataType(DataType.Password)]
[Display(Name = "Password")]
public string Password { get; set; }
[Required]
[EmailAddress]
[StringLength(IdentityUserConsts.MaxEmailLength)]
[Display(Name = "EmailAddress")]
public string Email { get; set; }
[StringLength(IdentityUserConsts.MaxPhoneNumberLength)]
[Display(Name = "PhoneNumber")]
public string PhoneNumber { get; set; }
[Display(Name = "TwoFactorVerification")]
public bool TwoFactorEnabled { get; set; } = true;
[Display(Name = "AccountLockoutOnFailedLoginAttempts")]
public bool LockoutEnabled { get; set; } = true;
}

12
modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml

@ -13,12 +13,12 @@
<abp-modal-body>
<abp-tabs name="create-user-modal-tabs">
<abp-tab title="@L["UserInformations"].Value">
<input asp-for="UserInfo.Id" />
<abp-input asp-for="UserInfo.UserName" />
<abp-input asp-for="UserInfo.Email" />
<abp-input asp-for="UserInfo.PhoneNumber" />
<abp-input asp-for="UserInfo.LockoutEnabled" />
<abp-input asp-for="UserInfo.TwoFactorEnabled" />
<input asp-for="UserInfo.Id"/>
<abp-input asp-for="UserInfo.UserName"/>
<abp-input asp-for="UserInfo.Email"/>
<abp-input asp-for="UserInfo.PhoneNumber"/>
<abp-input asp-for="UserInfo.LockoutEnabled"/>
<abp-input asp-for="UserInfo.TwoFactorEnabled"/>
</abp-tab>
<abp-tab title="@L["Roles"].Value">
@for (var i = 0; i < Model.Roles.Length; i++)

5
modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml.cs

@ -61,23 +61,18 @@ namespace Volo.Abp.Identity.Web.Pages.Identity.Users
[Required]
[StringLength(IdentityUserConsts.MaxUserNameLength)]
[Display(Name = "UserName")]
public string UserName { get; set; }
[Required]
[EmailAddress]
[StringLength(IdentityUserConsts.MaxEmailLength)]
[Display(Name = "EmailAddress")]
public string Email { get; set; }
[StringLength(IdentityUserConsts.MaxPhoneNumberLength)]
[Display(Name = "PhoneNumber")]
public string PhoneNumber { get; set; }
[Display(Name = "TwoFactorVerification")]
public bool TwoFactorEnabled { get; set; }
[Display(Name = "AccountLockoutOnFailedLoginAttempts")]
public bool LockoutEnabled { get; set; }
}

Loading…
Cancel
Save