NIHVIVO-2796: Re-factored contact form templates

This commit is contained in:
manolobevia 2011-06-29 20:48:32 +00:00
parent 74a48d09a3
commit f6a0fdebfe
4 changed files with 38 additions and 35 deletions

View file

@ -5,12 +5,14 @@
<p>${datetime}</p> <p>${datetime}</p>
<#if spamReason??> <#if spamReason??>
<div style="color:red;"> <section id="error-alert" role="alert">
<img src="${urls.images}/iconAlert.png" width="24" height="24" alert="Error alert icon" />
<p>REJECTED - SPAM</p> <p>REJECTED - SPAM</p>
<p>${spamReason}</p> <p>${spamReason}</p>
</div> </section>
</#if> </#if>
${msgText} ${msgText}
<hr /> <hr />

View file

@ -8,15 +8,21 @@
<head> <head>
<title>${subject}</title> <title>${subject}</title>
</head> </head>
<body> <body>
<h3>${subject}</h3> <h3>${subject}</h3>
<p><strong>From:</strong> ${name}</p>
<p><strong>Email address:</strong> ${emailAddress}</p>
<p> <p>
<strong>From:</strong> ${name}<br />
<strong>Email address:</strong> ${emailAddress}<br />
<strong>IP address:</strong> ${ip}<br /> <strong>IP address:</strong> ${ip}<br />
<#if referrer??> <#if referrer??>
<em>Likely viewing page: ${referrer}</em><br /> <em>Likely viewing page: ${referrer}</em>
</#if> </#if>
<strong>Comments:</strong> ${comments} </p>
<p><strong>Comments:</strong> ${comments}</p>
</body> </body>
</html> </html>

View file

@ -4,13 +4,10 @@
<h2>${title}</h2> <h2>${title}</h2>
<#if errorMessage?has_content> <#if errorMessage?has_content>
<section id="error-alert"><img src="${urls.images}/iconAlert.png" role="error alert"/>
<div id="error-alert"><img src="${urls.images}/iconAlert.png"/> <p>${errorMessage}</p>
<p>${errorMessage}</p> </section>
</div> </#if>
</#if>
<p class="contactUsReturnHome">Return to the <a href="${urls.home}">home page</a>.</p> <p class="contactUsReturnHome">Return to the <a href="${urls.home}">home page</a>.</p>

View file

@ -2,38 +2,36 @@
<#-- Contact form --> <#-- Contact form -->
<div class="staticPageBackground feedbackForm"> <section class="staticPageBackground feedbackForm" role="region">
<h2>${title}</h2> <h2>${title}</h2>
<p>Thank you for your interest in ${siteName}. <p>Thank you for your interest in ${siteName}.
Please submit this form with questions, comments, or feedback about the content of this site. Please submit this form with questions, comments, or feedback about the content of this site.
</p> </p>
<form name="contact_form" id="contact_form" action="${formAction}" method="post" onsubmit="return ValidateForm('contact_form');"> <form name="contact_form" id="contact_form" class="customForm" action="${formAction}" method="post" onsubmit="return ValidateForm('contact_form');" role="contact form">
<input type="hidden" name="RequiredFields" value="webusername,webuseremail,s34gfd88p9x1"/> <input type="hidden" name="RequiredFields" value="webusername,webuseremail,s34gfd88p9x1" />
<input type="hidden" name="RequiredFieldsNames" value="Name,Email address,Comments"/> <input type="hidden" name="RequiredFieldsNames" value="Name,Email address,Comments" />
<input type="hidden" name="EmailFields" value="webuseremail"/> <input type="hidden" name="EmailFields" value="webuseremail" />
<input type="hidden" name="EmailFieldsNames" value="emailaddress"/> <input type="hidden" name="EmailFieldsNames" value="emailaddress" />
<input type="hidden" name="DeliveryType" value="contact"/> <input type="hidden" name="DeliveryType" value="contact" />
<label for="webusername">Full name</label> <label for="webusername">Full name <span class="requiredHint"> *</span></label>
<p><input style="width:33%;" type="text" name="webusername" maxlength="255"/></p> <input type="text" name="webusername" />
<label for="webuseremail">Email address</label>
<p><input style="width:25%;" type="text" name="webuseremail" maxlength="255"/></p> <label for="webuseremail">Email address <span class="requiredHint"> *</span></label>
<input type="text" name="webuseremail" />
<label>Comments, questions, or suggestions</label>
<label>Comments, questions, or suggestions <span class="requiredHint"> *</span></label>
<textarea name="s34gfd88p9x1" rows="10" cols="90"></textarea> <textarea name="s34gfd88p9x1" rows="10" cols="90"></textarea>
<div class="buttons"> <div class="buttons">
<input id="submit" type="submit" value="Send Mail"/> <input id="submit" type="submit" value="Send Mail" />
</div </div
<p style="font-weight: bold; margin-top: 1em">Thank you!</p> <p class="requiredHint">* required fields</p>
</form> </form>
</section>
</div>
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/edit/forms/css/customForm.css" />')}
${scripts.add('<script type="text/javascript" src="${urls.base}/js/commentForm.js"></script>')} ${scripts.add('<script type="text/javascript" src="${urls.base}/js/commentForm.js"></script>')}