ref #8088: adapt labels and fix publish flag in edit wizard
authorKatja Luther <k.luther@bgbm.org>
Thu, 21 Feb 2019 08:41:19 +0000 (09:41 +0100)
committerKatja Luther <k.luther@bgbm.org>
Thu, 21 Feb 2019 08:42:42 +0000 (09:42 +0100)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailElement.java

index 08de367d8acf1863c2d58ca0e345888d3135cab6..09af35c45a954599be685828ce94a775cb8a2f30 100644 (file)
@@ -169,10 +169,10 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<TaxonNode>
         parentTreeNode = entity.getParent();
                if (entity instanceof TaxonNode && parentTreeNode.getTaxon() != null) {
                    checkbox_publish = formFactory.createCheckbox(formElement,
-                           "Taxon is public", parentTreeNode.getTaxon().isPublish(), style);
+                           "Taxon is published", entity.getTaxon().isPublish(), style);
                }else{
                    checkbox_publish = formFactory.createCheckbox(formElement,
-                    "Taxon is public", true, style);
+                    "Taxon is published", true, style);
                }
                checkbox_publish.setEnabled(isCreateNew());
                if(isCreateNew()){
@@ -193,6 +193,7 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<TaxonNode>
 
            } else{
             setTreeNode(entity);
+
             complete = true;
         }
                if (entity instanceof TaxonNode) {
@@ -388,6 +389,7 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<TaxonNode>
        private void setTaxon(Taxon taxon) {
                this.taxon = taxon;
                getEntity().setTaxon(taxon);
+               this.set_publish(taxon.isPublish());
                if (isCreateNew()){
                    textNewTaxonName.setText(taxon.getName().getTitleCache());
                    if (taxon.getSec() != null){