Project

General

Profile

« Previous | Next » 

Revision d1428f78

Added by Katja Luther about 7 years ago

fix #6304: before deleting a person in bulkeditor check with isDeletable

View differences:

eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/handler/DeleteHandler.java
124 124
         				        if (object != null){
125 125
         				            config = new NameDeletionConfigurator();
126 126

  
127
         				            DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the name?\nThis operation is irreversible!", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0);
127
         				            DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the name?\nThis operation is irreversible!", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0, true);
128 128
         				            int result_dialog= dialog.open();
129 129
         				            if (result_dialog != Status.OK){
130 130
         				                return null;
......
140 140
        							Synonym synonym = HibernateProxyHelper.deproxy(object, Synonym.class);
141 141
        							config = new SynonymDeletionConfigurator();
142 142
        							errorMessage = "The synonym ";
143
        							DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the synonym?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0);
143
        							DeleteConfiguratorDialog dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the synonym?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0, true);
144 144
                                    int result_dialog= dialog.open();
145 145
                                    if (result_dialog != Status.OK){
146 146
                                         return null;
......
159 159
        							config = new TaxonDeletionConfigurator();
160 160
        							((TaxonDeletionConfigurator) config).setDeleteInAllClassifications(true);
161 161
        							DeleteConfiguratorDialog dialog;
162
        						    dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the taxon?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0);
162
        						    dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the taxon?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0, true);
163 163
        							int result_dialog= dialog.open();
164 164
                                    if (result_dialog != Status.OK){
165 165
                                         return null;
......
168 168

  
169 169
        						}
170 170
         				    } else if (object instanceof TeamOrPersonBase){
171

  
171
         				        result = controller.getAgentService().isDeletable(((CdmBase) object).getUuid(), null);
172 172
    						  errorMessage = "The team or person ";
173 173
         				   } else if (object instanceof Media){
174 174
         				       config = new MediaDeletionConfigurator();
175 175
         				       Media media = HibernateProxyHelper.deproxy(object, Media.class);
176 176
         				       DeleteConfiguratorDialog dialog;
177
        					   dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the media?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0);
177
        					   dialog = new DeleteConfiguratorDialog(config, HandlerUtil.getActiveShell(event), "Confirm Deletion",  null,  "Do you really want to delete the media?", MessageDialog.WARNING, new String[] { "Delete", "Skip" }, 0, true);
178 178
        					   int result_dialog= dialog.open();
179 179
                               if (result_dialog != Status.OK){
180 180
                                   return null;

Also available in: Unified diff