Skip to content

Commit 02cff30

Browse files
committed
Merge branch 'master' of github.com:calacademy-research/antweb
2 parents 091bdbb + 3aeedd1 commit 02cff30

2 files changed

Lines changed: 39 additions & 29 deletions

File tree

web/curate/curate-body.jsp

Lines changed: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ Need Help? Check out the <a href="<%= domainApp %>/documentation.do" target="new
142142
<!-- Universal Specimen Upload -->
143143
<!-- Antweb, TaxonWorks, or GBIF Specimen (file or Zip File) Upload -->
144144

145-
<html:form method="POST" action="upload.do" enctype="multipart/form-data">
145+
<html:form method="POST" action="upload.do" enctype="multipart/form-data">
146146

147147
<div class="admin_action_item">
148148
<br>
@@ -155,47 +155,57 @@ Need Help? Check out the <a href="<%= domainApp %>/documentation.do" target="new
155155
<%
156156
if (LoginMgr.isAdmin(accessLogin)) { %>
157157

158-
<div class="align_left">
159-
&nbsp;&nbsp;Upload Type:
160-
<select name="action">
161-
<option value="specimenUpload" selected>Antweb
162-
<option value="taxonWorksUpload">TaxonWorks
163-
<option value="GBIFUpload">GBIF
164-
</select>
165-
</div>
166-
167-
<div class="align_left">
168-
&nbsp;&nbsp;Upload as:
169-
<select name="uploadAs">
170-
<option value="<%= accessLogin.getId() %>" selected><%= accessLogin.getName() %>
171-
158+
<div class="align_left">
159+
&nbsp;&nbsp;Upload Type:
160+
<select name="action">
161+
<option value="specimenUpload" selected>Antweb
162+
<option value="taxonWorksUpload">TaxonWorks
163+
<option value="GBIFUpload">GBIF
164+
</select>
165+
166+
&nbsp;&nbsp;Upload as:
167+
<select name="uploadAs">
168+
<option value="<%= accessLogin.getId() %>" selected><%= accessLogin.getName() %>
172169
<%
173170
String uploadAs = accessLogin.getUploadAs();
174-
if (uploadAs != null) {
171+
if (uploadAs != null && !"".equals(uploadAs)) {
175172
List<String> curatorList = new ArrayList<String>(Arrays.asList(uploadAs.split(",")));
176173
for (String curatorIdStr : curatorList) {
174+
try {
177175
int curatorId = Integer.parseInt((curatorIdStr.trim()));
178176
Login curator = LoginMgr.getCurator(curatorId);
179177
%>
180-
<option value="<%= curator.getId() %>"><%= curator.getName() %>
181-
<% } %>
182-
</select>
183-
</div>
184-
178+
<option value="<%= curator.getId() %>"><%= curator.getName() %>
179+
<%
180+
} catch (NumberFormatException e) {
181+
AntwebUtil.log("NumberFormatException for curatorID:" + curatorIdStr);
182+
}
183+
} %>
185184
<% } %>
185+
186+
</select>
187+
</div>
188+
<div class="clear"></div>
189+
186190
<% } else { %>
187191
<input type="hidden" name="action" value="specimenUpload" />
188-
<input type="hidden" name="specimenUploadLoginId" value="<%= accessLogin.getId() %>" />
189-
192+
<input type="hidden" name="specimenUploadLoginId" value="<%= accessLogin.getId() %>" />
190193
<% } %>
191194

192-
<div class="align_right"><input border="0" type="image" src="<%= domainApp %>/image/grey_submit.png" width="77" height="23" value="Submit" <%= active %>></div>
193-
<div class="clear">
195+
<div class="clear"></div>
196+
197+
<div class="align_right">
198+
<input border="0" type="image" src="<%= domainApp %>/image/grey_submit.png" width="77" height="23" value="Submit" <%= active %>>
199+
</div>
200+
201+
<div class="clear"></div>
202+
194203
To calculate the taxon children counts run the <a href='<%= domainApp %>/utilData.do?action=runCountCrawls' title="If taxon children counts are not calculated subsequent to the upload, it will happen nightly.">Count Crawls<img src=<%= domainApp%>/image/new1.png width=20></a>
195204
<br>If not returned an upload report, find it in the <a href='<%= domainApp %>/listSpecimenUploads.do?groupId=<%= accessGroup.getId() %>'>Specimen Upload Reports</a>. <br><br>
196-
</div>
197-
</div>
198-
</html:form>
205+
206+
</div>
207+
<div class="clear"></div>
208+
</html:form>
199209

200210
<!-- End Specimen file or Zip File Upload -->
201211

web/curate/viewLogin-body.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ NOTE: These will not be modified unless "Changed Password" button is selected.
196196
</h3>
197197

198198
<% if (LoginMgr.isAdmin(accessLogin)) { %>
199-
<br>
199+
<br>
200200
<H3>Upload As (comma separated list of curator IDs):
201201
<input type="text" name="uploadAs" <%= (LoginMgr.isAdmin(accessLogin)) ? "" : " disabled" %> value="<%= thisLogin.getUploadAs() %>">
202202
</h3>

0 commit comments

Comments
 (0)