added research area check box to manual import panel

This commit is contained in:
Emil Siverhall 2012-02-13 15:11:28 +01:00
parent d76acea80f
commit 3527e2cbf9
2 changed files with 9 additions and 9 deletions
src/main/java/se/su/dsv/scipro/admin/panels

@ -13,8 +13,8 @@
<div>Include linked projects (only applies when importing users): <input type="checkbox" wicket:id="includeLinkedProjects"/></div>
<div>Import all supervisors: <input type="checkbox" wicket:id="importSupervisors"/></div>
<div>Import attached units to supervisors: <input type="checkbox" wicket:id="importSupervisorUnits" /></div>
<!-- <div>Import all research areas from remote: <input type="checkbox" wicket:id="importResearchAreas" /></div>
--> <div><input type="submit"/></div>
<div>Import all research areas from remote: <input type="checkbox" wicket:id="importResearchAreas" /></div>
<div><input type="submit"/></div>
</form>
</wicket:enclosure>
<div wicket:id="statusMessage"></div>

@ -55,7 +55,7 @@ public class ManualImportExportPanel extends Panel {
final long userIdIn = params.getImportUserId();
final boolean importSupervisors = params.isImportSupervisors();
final boolean importSupervisorUnits = params.isImportSupervisorUnits();
//final boolean importResearchAreas = params.isImportResearchAreas();
final boolean importResearchAreas = params.isImportResearchAreas();
final long projectIdIn = params.getImportProjectId();
final String projectTitleIn = params.getImportProjectTitle();
final long projectIdOut = params.getExportProjectId();
@ -100,7 +100,7 @@ public class ManualImportExportPanel extends Panel {
setMessage("Failed to import units from "+getRemoteUrl()+", error: "+eie.getWrappedErrorCode());
}
}
/* if(importResearchAreas){
if(importResearchAreas){
logger.debug("Importing all research areas from remote host");
try {
externalImporter.importResearchAreas();
@ -109,7 +109,7 @@ public class ManualImportExportPanel extends Panel {
logger.warn("Caught error while importing research areas from remote system: "+eie.getMessage());
setMessage("Failed to import research areas from "+getRemoteUrl()+", error: "+eie.getWrappedErrorCode());
}
}*/
}
if(projectIdIn > 0){
logger.debug("Attempting remote import of project: "+projectIdIn);
try{
@ -145,7 +145,7 @@ public class ManualImportExportPanel extends Panel {
importExportForm.add(new CheckBox("includeLinkedProjects"));
importExportForm.add(new CheckBox("importSupervisors"));
importExportForm.add(new CheckBox("importSupervisorUnits"));
//importExportForm.add(new CheckBox("importResearchAreas"));
importExportForm.add(new CheckBox("importResearchAreas"));
importExportForm.setVisible(hasRemote());
}
private boolean hasRemote(){
@ -164,7 +164,7 @@ public class ManualImportExportPanel extends Panel {
private long importUserId;
private boolean importSupervisors;
private boolean importSupervisorUnits;
//private boolean importResearchAreas;
private boolean importResearchAreas;
private long importProjectId;
private String importProjectTitle;
private long exportProjectId;
@ -217,11 +217,11 @@ public class ManualImportExportPanel extends Panel {
public void setIncludeLinkedProjects(boolean includeLinkedProjects) {
this.includeLinkedProjects = includeLinkedProjects;
}
/* public void setImportResearchAreas(boolean importResearchAreas) {
public void setImportResearchAreas(boolean importResearchAreas) {
this.importResearchAreas = importResearchAreas;
}
public boolean isImportResearchAreas() {
return importResearchAreas;
}*/
}
}
}