set the correct Notary public role
This commit is contained in:
parent
01d98ce552
commit
ce114653ed
@ -39,8 +39,8 @@
|
||||
<div class="col">
|
||||
<label class="form-label">Register As</label>
|
||||
<div>
|
||||
<div class="form-check form-check-inline"><input id="IsPrincipal" class="form-check-input" type="radio" name="RoleType" checked value="Principal" asp-for="RoleType" /><label class="form-check-label" for="IsPrincipal">Principal</label></div>
|
||||
<div class="form-check form-check-inline"><input id="IsNotaryPublic" class="form-check-input" type="radio" name="RoleType" value="Notary Public" asp-for="RoleType" /><label class="form-check-label" for="IsNotaryPublic">Notary Public </label></div>
|
||||
<div class="form-check form-check-inline"><input id="IsPrincipal" class="form-check-input" type="radio" name="RoleType" checked value="@(nameof(UserType.Principal))" asp-for="RoleType" /><label class="form-check-label" for="IsPrincipal">Principal</label></div>
|
||||
<div class="form-check form-check-inline"><input id="IsNotaryPublic" class="form-check-input" type="radio" name="RoleType" value="@(nameof(UserType.Notary))" asp-for="RoleType" /><label class="form-check-label" for="IsNotaryPublic">Notary Public </label></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -17,7 +17,7 @@ namespace EnotaryoPH.Web.Pages
|
||||
_passwordService = passwordService;
|
||||
}
|
||||
|
||||
public void OnGet() => RoleType = "Principal";
|
||||
public void OnGet() => RoleType = nameof(UserType.Principal);
|
||||
|
||||
public IActionResult OnPost()
|
||||
{
|
||||
@ -51,7 +51,7 @@ namespace EnotaryoPH.Web.Pages
|
||||
};
|
||||
_notaryoDBContext.Users.Add(newUser);
|
||||
|
||||
if (RoleType == "Notary Public")
|
||||
if (RoleType == nameof(UserType.Notary))
|
||||
{
|
||||
var newLawyer = new Lawyer
|
||||
{
|
||||
@ -75,7 +75,7 @@ namespace EnotaryoPH.Web.Pages
|
||||
|
||||
_notaryoDBContext.SaveChanges();
|
||||
|
||||
return RoleType == "Principal"
|
||||
return RoleType == nameof(UserType.Principal)
|
||||
? Redirect("/Principal/Dashboard/Dashboard")
|
||||
: Redirect("/Notary/Dashboard/Dashboard");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user