MemberAdminWindow: Make first email address required when contact via email is enabled
Some checks failed
Test / Run tests (push) Failing after 2m37s
Some checks failed
Test / Run tests (push) Failing after 2m37s
This commit is contained in:
@ -524,7 +524,7 @@
|
||||
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed"
|
||||
HorizontalAlignment="Left" Margin="0,0,0,15" VerticalAlignment="Bottom" Grid.Column="1" Grid.ColumnSpan="2"/>
|
||||
<CheckBox x:Name="ContactEmailInput" Content="E-Mail" IsEnabled="False"
|
||||
Checked="CheckBox_Changed" Unchecked="CheckBox_Changed"
|
||||
Checked="ContactEmailInput_Changed" Unchecked="ContactEmailInput_Changed"
|
||||
HorizontalAlignment="Left" Margin="60,0,0,15" VerticalAlignment="Bottom" Grid.Column="1" Grid.ColumnSpan="2"/>
|
||||
|
||||
<Button x:Name="DeliveryButton" Content="Lieferungen" Click="DeliveryButton_Click" IsEnabled="False"
|
||||
|
@ -1243,7 +1243,11 @@ namespace Elwig.Windows {
|
||||
}
|
||||
|
||||
private new void EmailAddressInput_TextChanged(object sender, TextChangedEventArgs evt) {
|
||||
base.EmailAddressInput_TextChanged(sender, evt);
|
||||
if (sender == EmailAddress1Input && ContactEmailInput.IsChecked == true) {
|
||||
InputTextChanged((TextBox)sender, Validator.CheckEmailAddress((TextBox)sender, true));
|
||||
} else {
|
||||
base.EmailAddressInput_TextChanged(sender, evt);
|
||||
}
|
||||
UpdateContactInfoVisibility(IsEditing || IsCreating);
|
||||
}
|
||||
|
||||
@ -1252,6 +1256,10 @@ namespace Elwig.Windows {
|
||||
UpdateContactInfoVisibility(IsEditing || IsCreating);
|
||||
}
|
||||
|
||||
private void ContactEmailInput_Changed(object sender, RoutedEventArgs evt) {
|
||||
EmailAddressInput_TextChanged(EmailAddress1Input, new TextChangedEventArgs(evt.RoutedEvent, UndoAction.None));
|
||||
}
|
||||
|
||||
private void KgDetailsButton_Click(object sender, RoutedEventArgs evt) {
|
||||
if (DefaultKgInput.SelectedItem is AT_Kg kg) {
|
||||
App.FocusOriginHierarchyKg(kg.KgNr);
|
||||
|
Reference in New Issue
Block a user