summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/gui/lecture/CreateLectureAllgemein_GUI.java
diff options
context:
space:
mode:
authorMichael Wilson2014-11-20 19:10:10 +0100
committerMichael Wilson2014-11-20 19:10:10 +0100
commitc067221e05dcf17d6b86772b1135640d14cfcd28 (patch)
tree42a1dcac2c293fc5a8e2eefb85289ad6ff70a065 /dozentenmodul/src/main/java/gui/lecture/CreateLectureAllgemein_GUI.java
parentLists now have the functionality to show complete lists, when role=="Admin" (diff)
parent• replaced getText() with getText().trim() (diff)
downloadtutor-module-c067221e05dcf17d6b86772b1135640d14cfcd28.tar.gz
tutor-module-c067221e05dcf17d6b86772b1135640d14cfcd28.tar.xz
tutor-module-c067221e05dcf17d6b86772b1135640d14cfcd28.zip
Merge branch 'master' of ssh://git.openslx.org/openslx-ng/tutor-module
Diffstat (limited to 'dozentenmodul/src/main/java/gui/lecture/CreateLectureAllgemein_GUI.java')
-rw-r--r--dozentenmodul/src/main/java/gui/lecture/CreateLectureAllgemein_GUI.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/dozentenmodul/src/main/java/gui/lecture/CreateLectureAllgemein_GUI.java b/dozentenmodul/src/main/java/gui/lecture/CreateLectureAllgemein_GUI.java
index 3969eb0d..9f2c56d1 100644
--- a/dozentenmodul/src/main/java/gui/lecture/CreateLectureAllgemein_GUI.java
+++ b/dozentenmodul/src/main/java/gui/lecture/CreateLectureAllgemein_GUI.java
@@ -384,8 +384,8 @@ public class CreateLectureAllgemein_GUI extends JFrame {
}
Lecture.lecture.setName(txtFldVeranstaltungsname
- .getText());
- Lecture.lecture.setDesc(description.getText());
+ .getText().trim());
+ Lecture.lecture.setDesc(description.getText().trim());
Lecture.lecture.setEnddate(dateChooserend.getDate());
Lecture.lecture.setStartdate(dateChooserstart.getDate());
@@ -434,8 +434,8 @@ public class CreateLectureAllgemein_GUI extends JFrame {
isDateMaxLifeTimeCorrect = true;
}
// Pruefen ob alles eingegeben wurde
- if (txtFldVeranstaltungsname.getText().isEmpty() == true
- || description.getText().isEmpty() == true) {
+ if (txtFldVeranstaltungsname.getText().trim().isEmpty() == true
+ || description.getText().trim().isEmpty() == true) {
// mind 1 Textfeld ist leer
isAllInformationReady = false;
JOptionPane
@@ -463,8 +463,8 @@ public class CreateLectureAllgemein_GUI extends JFrame {
&& descriptionLenghtOK() == true) {
// everything is ok, proceed
Lecture.lecture.setName(txtFldVeranstaltungsname
- .getText());
- Lecture.lecture.setDesc(description.getText());
+ .getText().trim());
+ Lecture.lecture.setDesc(description.getText().trim());
Lecture.lecture.setEnddate(dateChooserend.getDate());
Lecture.lecture.setStartdate(dateChooserstart
.getDate());
@@ -567,11 +567,11 @@ public class CreateLectureAllgemein_GUI extends JFrame {
descriptionLengthOK = false;
// max length is 254 chars
- if (description.getText().length() >= MAX_DESCRIPTION_LENGTH) {
+ if (description.getText().trim().length() >= MAX_DESCRIPTION_LENGTH) {
descriptionLengthOK = false;
JOptionPane.showMessageDialog(c,
"Die Beschreibung darf max 254 Zeichen enthalten. Aktuell enthält sie "
- + description.getText().length() + ".",
+ + description.getText().trim().length() + ".",
"Beschreibung zu umfangreich",
JOptionPane.INFORMATION_MESSAGE);
} else {