Fixed a bunch of warnings
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
|
||||
private User User { get; set; } = new();
|
||||
|
||||
private string Password { get; set; }
|
||||
private string ConfirmPassword { get; set; }
|
||||
private string? Password { get; set; }
|
||||
private string? ConfirmPassword { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<User> OnPasswortSet { get; set; }
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
private async Task SaveClick(object arg)
|
||||
{
|
||||
User.Password = Password;
|
||||
User.Password = Password ?? string.Empty;
|
||||
await OnPasswortSet.InvokeAsync(User);
|
||||
await ModalReference.Hide();
|
||||
}
|
||||
@@ -51,19 +51,19 @@
|
||||
<Field>
|
||||
<FieldLabel>Passwort</FieldLabel>
|
||||
<Validation Validator="ValidationHelper.ValidatePassword" @bind-Status="@IsValidPassword">
|
||||
<TextEdit @bind-Text="Password" Role="TextRole.Password" Placeholder="Passwort"></TextEdit>
|
||||
<TextEdit @bind-Text="Password" Placeholder="Passwort" Role="TextRole.Password"></TextEdit>
|
||||
</Validation>
|
||||
</Field>
|
||||
<Field>
|
||||
<FieldLabel>Passwort wiederholen</FieldLabel>
|
||||
<Validation Validator="ValidationHelper.ValidatePassword" @bind-Status="@IsValidConfirm">
|
||||
<TextEdit @bind-Text="ConfirmPassword" Role="TextRole.Password" Placeholder="Passwort"></TextEdit>
|
||||
<TextEdit @bind-Text="ConfirmPassword" Placeholder="Passwort" Role="TextRole.Password"></TextEdit>
|
||||
</Validation>
|
||||
</Field>
|
||||
</ModalBody>
|
||||
<ModalFooter>
|
||||
<Button Color="Color.Secondary" Clicked="ModalReference.Hide">Abbrechen</Button>
|
||||
<Button Color="Color.Primary" Clicked="SaveClick" Disabled="@SaveDisabled">Speichern</Button>
|
||||
<Button Clicked="ModalReference.Hide" Color="Color.Secondary">Abbrechen</Button>
|
||||
<Button Clicked="SaveClick" Color="Color.Primary" Disabled="@SaveDisabled">Speichern</Button>
|
||||
</ModalFooter>
|
||||
</ModalContent>
|
||||
</Modal>
|
||||
Reference in New Issue
Block a user