Project

General

Profile

« Previous | Next » 

Revision 09015fb4

Added by Katja Luther about 5 years ago

ref #8136: externalization

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameTypeDesignationElement.java
16 16
import eu.etaxonomy.cdm.model.name.NameTypeDesignationStatus;
17 17
import eu.etaxonomy.cdm.model.name.TaxonName;
18 18
import eu.etaxonomy.cdm.model.term.TermType;
19
import eu.etaxonomy.taxeditor.l10n.Messages;
19 20
import eu.etaxonomy.taxeditor.model.MessagingUtils;
20 21
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
21 22
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
......
49 50
	public void createControls(ICdmFormElement formElement, int style) {
50 51

  
51 52
		checkbox_rejectedType = formFactory.createCheckbox(formElement,
52
				"Rejected Type", false, style);
53
				"Rejected Type", false, style); //$NON-NLS-1$
53 54
		checkbox_conservedType = formFactory.createCheckbox(formElement,
54
				"Conserved Type", false, style);
55
				"Conserved Type", false, style); //$NON-NLS-1$
55 56
		selection_typeName = formFactory
56 57
				.createSelectionElement(TaxonName.class,//getConversationHolder(),
57
				        formElement, "Name", null,
58
				        formElement, "Name", null, //$NON-NLS-1$
58 59
						EntitySelectionElement.ALL, style);
59 60
		combo_typeStatus = formFactory.createDefinedTermComboElement(TermType.NameTypeDesignationStatus, formElement,
60
						"Designation Status", null, style);
61
						"Designation Status", null, style); //$NON-NLS-1$
61 62

  
62 63
		super.createControls(formElement, style);
63 64
	}
......
86 87
		} else if (eventSource == selection_typeName) {
87 88
			getEntity().setTypeName(selection_typeName.getEntity());
88 89
		} else if (eventSource == combo_typeStatus) {
89
		    if (getEntity().getTypeStatus().isLectotype() && !combo_typeStatus.getSelection().isLectotype() && entity.getCitation() != null){
90
                boolean ok = MessagingUtils.confirmDialog("Citation will be removed", "When changing the type from lectotype to a non lectotype the citation will be removed.Do you want to continue?");
90
		    if (entity.getTypeStatus() != null && getEntity().getTypeStatus().isLectotype() && !combo_typeStatus.getSelection().isLectotype() && entity.getCitation() != null){
91
                boolean ok = MessagingUtils.confirmDialog(Messages.NameTypeDesignationElement_4, Messages.NameTypeDesignationElement_5);
91 92
                if (!ok){
92 93
                    combo_typeStatus.setSelection(entity.getTypeStatus());
93 94
                    return;

Also available in: Unified diff