Project

General

Profile

« Previous | Next » 

Revision 2671a71c

Added by Patrick Plitzner over 5 years ago

Disabel public flag checkbox in node wizard in edit mode

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailElement.java
100 100
	@Override
101 101
	protected void createControls(ICdmFormElement formElement,
102 102
	        ITaxonTreeNode entity, int style) {
103
	    if (createNew){
103
	    if (isCreateNew()){
104 104
    		selection_classification = formFactory
105 105
    				.createSelectionElement(Classification.class,//getConversationHolder(),
106 106
    				        formElement, "Classification",
......
165 165
		    checkbox_publish = formFactory.createCheckbox(formElement,
166 166
                    "Taxon is public", true, style);
167 167
		}
168
		checkbox_publish.setEnabled(isCreateNew());
168 169
		if(isCreateNew()){
169 170
	        CdmPreference defaultPublish = PreferencesUtil.getPreferenceFromDB(PreferencePredicate.DefaultBehaviourForPublishFlag);
170 171
	        if (defaultPublish != null && defaultPublish.getValue().equals(IPreferenceKeys.PUBLISH)){
......
271 272

  
272 273
			complete = !textNewTaxonName.getText().isEmpty();
273 274
		}
274
		if (!createNew){
275
		if (!isCreateNew()){
275 276
            if (eventSource == selection_Ref) {
276 277
                ((TaxonNode) getEntity()).setReference(selection_Ref.getEntity());
277 278
            }else if (eventSource == selection_SecRef) {
......
284 285
		}
285 286
		if (eventSource == checkbox_excluded) {
286 287
            excluded = checkbox_excluded.getSelection();
287
            if (!createNew){
288
            if (!isCreateNew()){
288 289
                ((TaxonNode)getEntity()).setExcluded(excluded);
289 290
            }
290 291
            multiLanguageTextExcludedNotes.setEnabled(excluded);
291 292
        }
292 293
		if (eventSource == checkbox_unplaced) {
293 294
            unplaced = checkbox_unplaced.getSelection();
294
            if (!createNew){
295
            if (!isCreateNew()){
295 296
                ((TaxonNode)getEntity()).setUnplaced(unplaced);
296 297
            }
297 298
        }

Also available in: Unified diff