diff options
| author | Michael Wilson | 2014-11-20 19:10:10 +0100 |
|---|---|---|
| committer | Michael Wilson | 2014-11-20 19:10:10 +0100 |
| commit | c067221e05dcf17d6b86772b1135640d14cfcd28 (patch) | |
| tree | 42a1dcac2c293fc5a8e2eefb85289ad6ff70a065 /dozentenmodul/src/main/java/gui/lecture/EditLectureAllgemein_GUI.java | |
| parent | Lists now have the functionality to show complete lists, when role=="Admin" (diff) | |
| parent | • replaced getText() with getText().trim() (diff) | |
| download | tutor-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/EditLectureAllgemein_GUI.java')
| -rw-r--r-- | dozentenmodul/src/main/java/gui/lecture/EditLectureAllgemein_GUI.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/dozentenmodul/src/main/java/gui/lecture/EditLectureAllgemein_GUI.java b/dozentenmodul/src/main/java/gui/lecture/EditLectureAllgemein_GUI.java index 45d4b0e2..e66adea2 100644 --- a/dozentenmodul/src/main/java/gui/lecture/EditLectureAllgemein_GUI.java +++ b/dozentenmodul/src/main/java/gui/lecture/EditLectureAllgemein_GUI.java @@ -400,11 +400,11 @@ public class EditLectureAllgemein_GUI extends JFrame { Lecture.lecture.setActive(false); } - Lecture.lecture.setName(textFieldLaborname.getText()); - Lecture.lecture.setDesc(description.getText()); + Lecture.lecture.setName(textFieldLaborname.getText().trim()); + Lecture.lecture.setDesc(description.getText().trim()); Lecture.lecture.setEnddate(dateChooserend.getDate()); Lecture.lecture.setStartdate(dateChooserstart.getDate()); - Image.image.setImagename(textFieldLaborname.getText()); + Image.image.setImagename(textFieldLaborname.getText().trim()); EditLectureSearch_GUI sr = new EditLectureSearch_GUI(c); sr.setVisible(true); @@ -452,8 +452,8 @@ public class EditLectureAllgemein_GUI extends JFrame { isDateMaxLifeTimeCorrect = true; } // Pruefen ob alles eingegeben wurde - if (textFieldLaborname.getText().isEmpty() == true - || description.getText().isEmpty() == true) { + if (textFieldLaborname.getText().trim().isEmpty() == true + || description.getText().trim().isEmpty() == true) { // mind 1 Textfeld ist leer isAllInformationReady = false; JOptionPane @@ -481,14 +481,14 @@ public class EditLectureAllgemein_GUI extends JFrame { && descriptionLenghtOK() == true) { // everything is ok, proceed Lecture.lecture.setNewName(textFieldLaborname - .getText()); - Lecture.lecture.setDesc(description.getText()); + .getText().trim()); + Lecture.lecture.setDesc(description.getText().trim()); Lecture.lecture.setEnddate(dateChooserend.getDate()); Lecture.lecture.setStartdate(dateChooserstart .getDate()); Image.image.setImagename(textFieldLaborname - .getText()); + .getText().trim()); PermissionEditLecture_GUI ev = new PermissionEditLecture_GUI(c); ev.setVisible(true); @@ -588,11 +588,11 @@ public class EditLectureAllgemein_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 { |
