Clean up paths and names relating to contact form. Use freemarker template to generate email backup.
This commit is contained in:
parent
a16985ccaa
commit
8b0665a0d7
10 changed files with 61 additions and 64 deletions
16
webapp/web/templates/freemarker/body/contactForm/backup.ftl
Normal file
16
webapp/web/templates/freemarker/body/contactForm/backup.ftl
Normal file
|
@ -0,0 +1,16 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Backup of contact mail email -->
|
||||
|
||||
<p>${datetime}</p>
|
||||
|
||||
<#if spamReason??>
|
||||
<div style="color:red;">
|
||||
<p>REJECTED - SPAM</p>
|
||||
<p>${spamReason}</p>
|
||||
</div>
|
||||
</#if>
|
||||
|
||||
${msgText}
|
||||
|
||||
<hr />
|
|
@ -0,0 +1,9 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Contact form submission confirmation page -->
|
||||
|
||||
<h2>Thank you for your feedback</h2>
|
||||
<img src="${siteIconPath}/mail.gif" alt="mailbox"/><br/>
|
||||
|
||||
<p>Thank you for contacting our curation and development team. We will respond to your inquiry as soon as possible.</p>
|
||||
<p>Return to the <a href="${urls.home}">home page</a>.</p>
|
22
webapp/web/templates/freemarker/body/contactForm/email.ftl
Normal file
22
webapp/web/templates/freemarker/body/contactForm/email.ftl
Normal file
|
@ -0,0 +1,22 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Contact form email response -->
|
||||
|
||||
<#-- Only inline styles seem to work in email. Can't get styles for margin to work, though. -->
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>${subject}</title>
|
||||
</head>
|
||||
<body>
|
||||
<h3>${subject}</h3>
|
||||
<p>
|
||||
<strong>From:</strong> ${name}<br />
|
||||
<strong>Email address:</strong> ${emailAddress}<br />
|
||||
<strong>IP address:</strong> ${ip}<br />
|
||||
<#if referrer??>
|
||||
<em>Likely viewing page: ${referrer}</em><br />
|
||||
</#if>
|
||||
<strong>Comments:</strong> ${comments}
|
||||
</body>
|
||||
</html>
|
16
webapp/web/templates/freemarker/body/contactForm/error.ftl
Normal file
16
webapp/web/templates/freemarker/body/contactForm/error.ftl
Normal file
|
@ -0,0 +1,16 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Contact form processing errors -->
|
||||
|
||||
<h2>${title}</h2>
|
||||
|
||||
<img src="${siteIconPath}/bomb.gif" alt="email error"/>
|
||||
|
||||
<p class="normal">An error occurred during the processing of your request.<br />
|
||||
<#if errorMessage?has_content>
|
||||
<strong>${errorMessage}</strong>
|
||||
</#if>
|
||||
</p>
|
||||
|
||||
|
||||
<p>Return to the <a href="${urls.home}">home page</a>.</p>
|
60
webapp/web/templates/freemarker/body/contactForm/form.ftl
Normal file
60
webapp/web/templates/freemarker/body/contactForm/form.ftl
Normal file
|
@ -0,0 +1,60 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Contact form -->
|
||||
|
||||
<div class="staticPageBackground feedbackForm">
|
||||
|
||||
<h2>${title}</h2>
|
||||
|
||||
<p>Thank you for your interest in
|
||||
<#compress>
|
||||
<#if portalType == "CALSResearch">
|
||||
the Cornell University College of Agriculture and Life Sciences Research Portal
|
||||
<#elseif portalType == "VIVO">
|
||||
VIVO
|
||||
<#else>
|
||||
the ${siteName} portal
|
||||
</#if>
|
||||
</#compress>.
|
||||
Please submit this form with questions, comments, or feedback about the content of this site.
|
||||
</p>
|
||||
|
||||
<#if siteName == "CALSResearch" || siteName == "CALSImpact">
|
||||
<p>
|
||||
${siteName} is a service that depends on regular updates and feedback.
|
||||
Please help us out by providing comments and suggestions for additional content (people, departments, courses, research services, etc.)
|
||||
that you would like to see represented. The reference librarians at Albert R. Mann Library will be in touch with you soon.
|
||||
</p>
|
||||
</#if>
|
||||
|
||||
<form name="contact_form" id="contact_form" action="submitFeedback" method="post" onsubmit="return ValidateForm('contact_form');">
|
||||
<input type="hidden" name="home" value="${portalId}"/>
|
||||
<input type="hidden" name="RequiredFields" value="webusername,webuseremail,s34gfd88p9x1"/>
|
||||
<input type="hidden" name="RequiredFieldsNames" value="Name,Email address,Comments"/>
|
||||
<input type="hidden" name="EmailFields" value="webuseremail"/>
|
||||
<input type="hidden" name="EmailFieldsNames" value="emailaddress"/>
|
||||
<input type="hidden" name="DeliveryType" value="contact"/>
|
||||
|
||||
<label for="webusername">Full name</label>
|
||||
<p><input style="width:33%;" type="text" name="webusername" maxlength="255"/></p>
|
||||
<label for="webuseremail">Email address</label>
|
||||
<p><input style="width:25%;" type="text" name="webuseremail" maxlength="255"/></p>
|
||||
|
||||
|
||||
<label>Comments, questions, or suggestions</label>
|
||||
|
||||
<textarea name="s34gfd88p9x1" rows="10" cols="90"></textarea>
|
||||
|
||||
<div class="buttons">
|
||||
<input type="submit" value="Send Mail" class="yellowbutton"/>
|
||||
<input type="reset" value="Clear Form" class="plainbutton"/>
|
||||
</div
|
||||
|
||||
<p style="font-weight: bold; margin-top: 1em">Thank you!</p>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<#-- RY This is temporary.
|
||||
<script src="${contextPath}/js/commentForm.js"></script>-->
|
||||
${scripts.add("/js/commentForm.js")}
|
Loading…
Add table
Add a link
Reference in a new issue