mirror of
https://github.com/AJMicke/KickerELO.git
synced 2026-03-12 22:11:08 +01:00
views: Reset input fields after successful save
This commit is contained in:
committed by
AJMicke
parent
818a0bced3
commit
e596cdd9c4
@@ -38,6 +38,9 @@ public class Enter1vs1View extends VerticalLayout {
|
||||
try {
|
||||
eloService.enterResult1vs1(winnerSelect.getValue(), loserSelect.getValue(), loserGoals.getValue().shortValue());
|
||||
Notification.show("Gespeichert").addThemeVariants(NotificationVariant.LUMO_SUCCESS);
|
||||
winnerSelect.setValue(null);
|
||||
loserSelect.setValue(null);
|
||||
loserGoals.setValue(0);
|
||||
} catch (NoSuchPlayerException err) {
|
||||
Notification.show("Unbekannter Spieler").addThemeVariants(NotificationVariant.LUMO_ERROR);
|
||||
} catch (DuplicatePlayerException err) {
|
||||
@@ -47,7 +50,9 @@ public class Enter1vs1View extends VerticalLayout {
|
||||
} catch (InvalidDataException err) {
|
||||
Notification.show("Verliertore falsch").addThemeVariants(NotificationVariant.LUMO_ERROR);
|
||||
}
|
||||
e.getSource().setEnabled(true);
|
||||
});
|
||||
saveButton.setDisableOnClick(true);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -45,6 +45,11 @@ public class Enter2vs2View extends VerticalLayout {
|
||||
try {
|
||||
eloService.enterResult2vs2(winnerFrontSelect.getValue(), winnerBackSelect.getValue(), loserFrontSelect.getValue(), loserBackSelect.getValue(), loserGoals.getValue().shortValue());
|
||||
Notification.show("Gespeichert").addThemeVariants(NotificationVariant.LUMO_SUCCESS);
|
||||
winnerFrontSelect.setValue(null);
|
||||
winnerBackSelect.setValue(null);
|
||||
loserFrontSelect.setValue(null);
|
||||
loserBackSelect.setValue(null);
|
||||
loserGoals.setValue(0);
|
||||
} catch (NoSuchPlayerException err) {
|
||||
Notification.show("Unbekannter Spieler").addThemeVariants(NotificationVariant.LUMO_ERROR);
|
||||
} catch (DuplicatePlayerException err) {
|
||||
@@ -54,7 +59,9 @@ public class Enter2vs2View extends VerticalLayout {
|
||||
} catch (InvalidDataException err) {
|
||||
Notification.show("Verliertore falsch").addThemeVariants(NotificationVariant.LUMO_ERROR);
|
||||
}
|
||||
e.getSource().setEnabled(true);
|
||||
});
|
||||
saveButton.setDisableOnClick(true);
|
||||
|
||||
|
||||
// Use custom CSS classes to apply styling. This is defined in
|
||||
|
||||
Reference in New Issue
Block a user