From: Katja Luther Date: Mon, 4 Jul 2016 13:20:35 +0000 (+0200) Subject: #4018: don't allow to finish, if no language is selected, quick fix X-Git-Tag: 4.2.0^2~10 X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/commitdiff_plain/1d6463ca297a8bcf0a88f92259f76742efa50a70 #4018: don't allow to finish, if no language is selected, quick fix --- diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/TermTranslationWizard.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/TermTranslationWizard.java index d10192048..37d7385d0 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/TermTranslationWizard.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/TermTranslationWizard.java @@ -53,7 +53,10 @@ public class TermTranslationWizard extends Wizard { @Override public boolean performFinish() { Representation representation = page.getTargetRepresentation(); - + + if (representation.getLanguage() == null){ + return false; + } if (!representation.getText().equals("") || !representation.getLabel().equals("") || !representation.getAbbreviatedLabel().equals("")) { term.addRepresentation(representation); } diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/translation/TranslationWizard.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/translation/TranslationWizard.java index 93c48b11f..18a51060e 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/translation/TranslationWizard.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/translation/TranslationWizard.java @@ -59,6 +59,9 @@ public class TranslationWizard extends Wizard { public boolean performFinish() { LanguageString languageString = page.getTargetLanguageString(); + if (languageString.getLanguage() == null){ + return false; + } if (!languageString.getText().equals("")) { multilanguageText.put(languageString.getLanguage(), languageString); }