Skip to content

Commit

Permalink
Fix Projekt View (#574)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannMaierhofer authored Jan 15, 2025
1 parent 04cf012 commit 187e1a7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions src/de/jost_net/JVerein/gui/control/ProjektControl.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ public Input getBezeichnung() throws RemoteException
return bezeichnung;
}
bezeichnung = new TextInput(getProjekt().getBezeichnung(), 50);
bezeichnung.setName("Bezeichnung");
bezeichnung.setMandatory(true);
return bezeichnung;
}

Expand All @@ -94,8 +96,6 @@ public Input getStartDatum() throws RemoteException
}
startDatum = new DateInput(d, new JVDateFormatTTMMJJJJ());
startDatum.setName("Startdatum");
startDatum.setTitle("Startdatum");
startDatum.setText("Bitte Startdatum w?hlen");
return startDatum;
}

Expand All @@ -113,8 +113,6 @@ public Input getEndeDatum() throws RemoteException
}
endeDatum = new DateInput(d, new JVDateFormatTTMMJJJJ());
endeDatum.setName("Endedatum");
endeDatum.setTitle("Endedatum");
endeDatum.setText("Bitte Endedatum w?hlen");
return endeDatum;
}

Expand Down
6 changes: 3 additions & 3 deletions src/de/jost_net/JVerein/gui/view/ProjektView.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ public void bind() throws Exception
final ProjektControl control = new ProjektControl(this);

LabelGroup group = new LabelGroup(getParent(), "Projekt");
group.addLabelPair("Bezeichnung", control.getBezeichnung());
group.addLabelPair("Startdatum", control.getStartDatum());
group.addLabelPair("Endedatum", control.getEndeDatum());
group.addInput(control.getBezeichnung());
group.addInput(control.getStartDatum());
group.addInput(control.getEndeDatum());

ButtonArea buttons = new ButtonArea();
buttons.addButton("Hilfe", new DokumentationAction(),
Expand Down
2 changes: 1 addition & 1 deletion src/de/jost_net/JVerein/server/ProjektImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ protected void insertCheck() throws ApplicationException

private void plausi() throws RemoteException, ApplicationException
{
if (getBezeichnung() == null)
if (getBezeichnung() == null || getBezeichnung().isEmpty())
{
throw new ApplicationException("Bitte Bezeichnung eingeben");
}
Expand Down

0 comments on commit 187e1a7

Please sign in to comment.