Browse files

Added shibboleth email address to form field for deposit receipt

fixed test templates
  • Loading branch information...
1 parent b307630 commit 3f6dab9cfceec8094461f60d31080bbb2b8079fb @gregjan gregjan committed Mar 15, 2013
View
2 forms/src/main/java/cdr/forms/EmailNotificationHandler.java
@@ -159,7 +159,7 @@ public void notifyError(Form form, DepositResult result,
message.setText(textsw.toString() , htmlsw.toString());
this.mailSender.send(mimeMessage);
} catch (MessagingException e) {
- LOG.error("problem sending deposit message", e);
+ LOG.error("problem sending error notification message", e);
}
}
View
10 forms/src/main/webapp/WEB-INF/jsp/form.jsp
@@ -347,6 +347,16 @@ pageContext.setAttribute("vocabURLMap", vocabURLMap);
</div>
</c:if>
+ <br/><h3>Email Address for Deposit Receipt</h3>
+ <p>Your deposit receipt will be emailed to the address below.</p>
+ <div class="indented_block">
+ <div class="form_field receipt_email_address_field">
+<% String email = request.getHeader("mail") == null ? "" : request.getHeader("mail");
+ if(email.endsWith("_UNC")) email = email.substring(0, email.length()-4); %>
+ <label>&nbsp;</label><input name="receiptEmailAddress" type="text" size="40" value="<%= email %>"/>
+ </div>
+ </div>
+
<div class="submit_container">
<input type="submit" value="submit deposit" />
</div>
View
12 forms/src/test/resources/DepositErrorHtml.ftl
@@ -30,16 +30,16 @@ ${result.getResponseBody()!"no response body"}
</pre>
<p>The following information was entered on <a href="${siteUrl}/forms/${formId}.form">${form.title}</a>:
<ul>
- <li>Depositor Username: ${form.currentUser}</li>
+ <li>Depositor Username: ${form.currentUser!""}</li>
<li>Depositor Email: ${depositorEmail!"not available"}</li>
<#list form.elements as element>
<#if element.ports??>
<#list element.ports as input>
- <#attempt>
- <li>${input.label}: ${input.enteredValue}</li>
- <#recover>
- <li>${input.label}: ${input.enteredValue?datetime}</li>
- </#attempt>
+ <#if input.class.name == "crosswalk.impl.DateInputFieldImpl">
+ <li>${input.label}: ${input.enteredValue?datetime!""}</li>
+ <#else>
+ <li>${input.label}: ${input.enteredValue!""}</li>
+ </#if>
</#list>
</#if>
</#list>
View
12 forms/src/test/resources/DepositErrorText.ftl
@@ -22,16 +22,16 @@ ${result.getResponseBody()!"no response body"}
=========================================
The following information was entered on ${siteUrl}/forms/${formId}.form
- * Depositor Username: ${form.currentUser}
+ * Depositor Username: ${form.currentUser!""}
* Depositor Email: ${depositorEmail!"not available"}
<#list form.elements as element>
<#if element.ports??>
<#list element.ports as input>
- <#attempt>
- * ${input.label}: ${input.enteredValue}
- <#recover>
- * ${input.label}: ${input.enteredValue?datetime}
- </#attempt>
+ <#if input.class.name == "crosswalk.impl.DateInputFieldImpl">
+ * ${input.label}: ${input.enteredValue?datetime!""}
+ <#else>
+ * ${input.label}: ${input.enteredValue!""}
+ </#if>
</#list>
</#if>
</#list>
View
12 forms/src/test/resources/DepositNoticeHtml.ftl
@@ -28,15 +28,15 @@
Please do not reply to this message.
<p>The following information was entered on <a href="${siteUrl}/forms/${formId}.form">${form.title}</a>:
<ul>
- <li>User: ${form.currentUser}</li>
+ <li>User: ${form.currentUser!""}</li>
<#list form.elements as element>
<#if element.ports??>
<#list element.ports as input>
- <#attempt>
- <li>${input.label}: ${input.enteredValue}</li>
- <#recover>
- <li>${input.label}: ${input.enteredValue?datetime}</li>
- </#attempt>
+ <#if input.class.name == "crosswalk.impl.DateInputFieldImpl">
+ <li>${input.label}: ${input.enteredValue?datetime!""}</li>
+ <#else>
+ <li>${input.label}: ${input.enteredValue!""}</li>
+ </#if>
</#list>
</#if>
</#list>
View
12 forms/src/test/resources/DepositNoticeText.ftl
@@ -20,15 +20,15 @@ A submission was received by ${form.title} at ${receivedDate?datetime}.
Please do not reply to this message.
The following information was entered on ${form.title} at ${siteUrl}/forms/${formId}.form:
- * User: ${form.currentUser}
+ * User: ${form.currentUser!""}
<#list form.elements as element>
<#if element.ports??>
<#list element.ports as input>
- <#attempt>
- * ${input.label}: ${input.enteredValue}
- <#recover>
- * ${input.label}: ${input.enteredValue?datetime}
- </#attempt>
+ <#if input.class.name == "crosswalk.impl.DateInputFieldImpl">
+ * ${input.label}: ${input.enteredValue?datetime!""}
+ <#else>
+ * ${input.label}: ${input.enteredValue!""}
+ </#if>
</#list>
</#if>
</#list>
View
12 forms/src/test/resources/DepositReceiptHtml.ftl
@@ -30,15 +30,15 @@
please contact ${form.contactName!}: ${form.contactEmail}</#if></p>
<p>You entered the following information on <a href="${siteUrl}/forms/${formId}.form">${form.title}</a>:
<ul>
- <li>User: ${form.currentUser}</li>
+ <li>User: ${form.currentUser!""}</li>
<#list form.elements as element>
<#if element.ports??>
<#list element.ports as input>
- <#attempt>
- <li>${input.label}: ${input.enteredValue}</li>
- <#recover>
- <li>${input.label}: ${input.enteredValue?datetime}</li>
- </#attempt>
+ <#if input.class.name == "crosswalk.impl.DateInputFieldImpl">
+ <li>${input.label}: ${input.enteredValue?datetime!""}</li>
+ <#else>
+ <li>${input.label}: ${input.enteredValue!""}</li>
+ </#if>
</#list>
</#if>
</#list>
View
12 forms/src/test/resources/DepositReceiptText.ftl
@@ -20,15 +20,15 @@ Your submission was received by the ${siteName} at ${receivedDate?datetime}.
Please do not reply to this message.<#if form.contactEmail??> If you have any questions or concerns about your submission, please contact ${form.contactName!}: ${form.contactEmail}</#if>
You entered the following information on ${form.title} at ${siteUrl}/forms/${formId}.form:
- * User: ${form.currentUser}
+ * User: ${form.currentUser!""}
<#list form.elements as element>
<#if element.ports??>
<#list element.ports as input>
- <#attempt>
- * ${input.label}: ${input.enteredValue}
- <#recover>
- * ${input.label}: ${input.enteredValue?datetime}
- </#attempt>
+ <#if input.class.name == "crosswalk.impl.DateInputFieldImpl">
+ * ${input.label}: ${input.enteredValue?datetime!""}
+ <#else>
+ * ${input.label}: ${input.enteredValue!""}
+ </#if>
</#list>
</#if>
</#list>

0 comments on commit 3f6dab9

Please sign in to comment.