Skip to content

Commit

Permalink
Added an alert
Browse files Browse the repository at this point in the history
  • Loading branch information
Techno11 committed Dec 22, 2018
1 parent 826025c commit 581a7ef
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/org/theorangealliance/datasync/tabs/TeamsController.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public void getTeamsFromFIRSTApi() {
} else { //We will ask the user for the TOA equivalent of this team #
TextInputDialog dialog = new TextInputDialog("");
dialog.setTitle("Custom Team Found");
dialog.setHeaderText("Team " + tN + " is a custom team. What is their Team Key on TheOrangeAlliance? ");
dialog.setHeaderText("Team " + tN + " is a custom team. What is their Team Key on TheOrangeAlliance? (If you can't find it, type \"Not Found\")");
dialog.setContentText("Example: ISR11056");

Optional<String> result = dialog.showAndWait();
Expand All @@ -198,7 +198,13 @@ public void getTeamsFromFIRSTApi() {
team[0].getTeamCity() + ", " + team[0].getTeamCity() + ", " + team[0].getTeamCountry());
teamsList.add(eventTeam);
} else {
controller.sendError("Custom Team " + tN + " not found on TOA as " + result.get() + ". Please Reimport teams and try again.");
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("Error");
alert.setHeaderText("Non-Existant Team");
alert.setContentText("This team is not on TOA, and therefore, must not have been registered in TIMS. Please contact [email protected] soon so we can manually add the team.");

alert.showAndWait();
//controller.sendError("Custom Team " + tN + " not found on TOA as " + result.get() + ". Please Reimport teams and try again.");
}
}));
});
Expand Down

0 comments on commit 581a7ef

Please sign in to comment.