NIHVIVO-3323: Refactored Site information form to reflect Wilma theme

NIHVIVO-3324: Applied wilma some look and feel to back-end forms
This commit is contained in:
manolobevia 2011-11-16 17:22:17 +00:00
parent 535bb3bbfc
commit 049a288be6
4 changed files with 114 additions and 76 deletions

View file

@ -86,10 +86,10 @@ public class ApplicationBeanRetryController extends BaseEditController {
FormUtils.populateFormFromBean(applicationForEditing, epo.getAction(), foo); FormUtils.populateFormFromBean(applicationForEditing, epo.getAction(), foo);
RequestDispatcher rd = request.getRequestDispatcher(Controllers.BASIC_JSP); RequestDispatcher rd = request.getRequestDispatcher(Controllers.BASIC_JSP);
request.setAttribute("bodyJsp","/templates/edit/formBasic.jsp"); request.setAttribute("bodyJsp","/templates/edit/formContact.jsp");
request.setAttribute("formJsp","/templates/edit/specific/applicationBean_retry.jsp"); request.setAttribute("formJsp","/templates/edit/specific/applicationBean_retry.jsp");
request.setAttribute("scripts","/templates/edit/formBasic.js"); request.setAttribute("scripts","/templates/edit/formBasic.js");
request.setAttribute("title","Site Information Editing Form"); request.setAttribute("title","Site Information");
request.setAttribute("_action",action); request.setAttribute("_action",action);
request.setAttribute("unqualifiedClassName","ApplicationBean"); request.setAttribute("unqualifiedClassName","ApplicationBean");
setRequestAttributes(request,epo); setRequestAttributes(request,epo);

View file

@ -1,5 +1,5 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> <%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div class="editingForm"> <div class="editingForm">
@ -19,20 +19,19 @@
<form id="editForm" name="editForm" action="${action}" method="post" onsubmit="${onSubmit}"> <form id="editForm" name="editForm" action="${action}" method="post" onsubmit="${onSubmit}">
<input type="hidden" name="_epoKey" value="${epoKey}" /> <input type="hidden" name="_epoKey" value="${epoKey}" />
<div align="center">
<table cellpadding="4" cellspacing="2"> <table cellpadding="4" cellspacing="2">
<tr><th colspan="${colspan}"> <tr><th colspan="${colspan}">
<div class="entryFormHead"> <div>
<h2>${title}</h2> <h2>${title}</h2>
<c:choose> <c:choose>
<c:when test='${_action == "insert"}'> <c:when test='${_action == "insert"}'>
<h3>Creating New Record</h3> <h3 class="blue">Creating New Record
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<h3>Editing Existing Record</h3> <h3 class="blue">Editing Existing Record
</c:otherwise> </c:otherwise>
</c:choose> </c:choose>
<span class="entryFormHeadInstructions">(<sup>*</sup> Required Fields)</span> <span class="note">(<sup>*</sup> Required Fields)</span></h3>
</div><!--entryFormHead--> </div><!--entryFormHead-->
</th></tr> </th></tr>
@ -41,33 +40,32 @@
<jsp:include page="${formJsp}"/> <jsp:include page="${formJsp}"/>
<tr class="editformcell"> <tr class="editformcell">
<td colspan="${colspan}" align="center"> <td colspan="${colspan}">
<c:choose> <c:choose>
<c:when test='${_action == "insert"}'> <c:when test='${_action == "insert"}'>
<input id="primaryAction" type="submit" class="form-button" name="_insert" value="Create New Record"/> <input id="primaryAction" type="submit" class="submit" name="_insert" value="Create New Record"/>
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<input id="primaryAction" type="submit" class="form-button" name="_update" value="Submit Changes"/> <input id="primaryAction" type="submit" class="submit" name="_update" value="Submit Changes"/>
<c:if test="${ ! (_cancelButtonDisabled == 'disabled') }"> <c:if test="${ ! (_cancelButtonDisabled == 'disabled') }">
<input type="submit" class="form-button" name="_delete" onclick="return confirmDelete();" value="Delete"/> <input type="submit" class="delete" name="_delete" onclick="return confirmDelete();" value="Delete"/>
</c:if> </c:if>
</c:otherwise> </c:otherwise>
</c:choose> </c:choose>
<input type="reset" class="form-button" value="Reset"/> <input type="reset" class="delete" value="Reset"/>
<c:choose> <c:choose>
<c:when test="${!empty formOnCancel}"> <c:when test="${!empty formOnCancel}">
<input type="submit" class="form-button" name="_cancel" onclick="${formOnCancel}" value="Cancel"/> <input type="submit" class="delete" name="_cancel" onclick="${formOnCancel}" value="Cancel"/>
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<input type="submit" class="form-button" name="_cancel" value="Cancel"/> <input type="submit" class="delete" name="_cancel" value="Cancel"/>
</c:otherwise> </c:otherwise>
</c:choose> </c:choose>
</td> </td>
</tr> </tr>
</table> </table>
</div><!--alignCenter-->
</form> </form>

View file

@ -0,0 +1,67 @@
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div class="editingForm">
<c:set var="onSubmit">
<c:out value="${formOnSubmit}" default="return true;"/>
</c:set>
<c:set var="action">
<c:out value="${editAction}" default="doEdit"/>
</c:set>
<form id="editForm" name="editForm" action="${action}" method="post" onsubmit="${onSubmit}">
<input type="hidden" name="_epoKey" value="${epoKey}" />
<h2>${title}</h2>
<c:choose>
<c:when test='${_action == "insert"}'>
<h3 class="blue">Creating New Record</h3>
</c:when>
<c:otherwise>
<h3 class="blue">Editing Existing Record</h3>
</c:otherwise>
</c:choose>
<!--<span class="entryFormHeadInstructions">(<sup>*</sup> Required Fields)</span>-->
<span class="warning">${globalErrorMsg}</span>
<jsp:include page="${formJsp}"/>
<br />
<c:choose>
<c:when test='${_action == "insert"}'>
<input id="primaryAction" type="submit" class="submit" name="_insert" value="Create new record"/>
</c:when>
<c:otherwise>
<input id="primaryAction" type="submit" class="submit" name="_update" value="Save changes"/>
<c:if test="${ ! (_cancelButtonDisabled == 'disabled') }">
<!--<input type="submit" class="delete" name="_delete" onclick="return confirmDelete();" value="Delete"/>-->
</c:if>
</c:otherwise>
</c:choose>
<!--<input type="reset" class="delete" value="Reset"/>-->
<c:choose>
<c:when test="${!empty formOnCancel}">
<input type="submit" class="delete" name="_cancel" onclick="${formOnCancel}" value="Cancel"/>
</c:when>
<c:otherwise>
<input type="submit" class="delete" name="_cancel" value="Cancel"/>
</c:otherwise>
</c:choose>
</form>
</div><!--editingform-->

View file

@ -10,19 +10,10 @@
<% request.setAttribute("requestedActions", new ManagePortals()); %> <% request.setAttribute("requestedActions", new ManagePortals()); %>
<vitro:confirmAuthorization /> <vitro:confirmAuthorization />
<c:set var="appNameLabel" value="Site Name"/> <c:set var="appNameLabel" value="Site name"/>
<label for="site-name">${appNameLabel}<span class="note"> (max 50 characters)</span></label>
<input type="text" name="ApplicationName" value="<form:value name="ApplicationName"/>" ${longField} maxlength="50" />
<c:set var="smallCell" value="style='width: 33%;'" /> <font color="red"><form:error name="ApplicationName"/></font>
<c:set var="longField" value="style='width: 75%;'" />
<tr class="editformcell">
<td valign="top" colspan="2">
<b>${appNameLabel}</b> <i>(max 50 characters)</i><br />
<input type="text" name="ApplicationName" value="<form:value name="ApplicationName"/>" ${longField} maxlength="50" />
<font color="red"><form:error name="ApplicationName"/></font>
</td>
</tr>
<!-- With introduction of new logo that includes tagline as part of the image, hiding this field for now to reduce user confusion --> <!-- With introduction of new logo that includes tagline as part of the image, hiding this field for now to reduce user confusion -->
<!-- <tr class="editformcell"> <!-- <tr class="editformcell">
@ -32,37 +23,27 @@
<font color="red"><form:error name="ShortHand"/></font> <font color="red"><form:error name="ShortHand"/></font>
</td> </td>
</tr> --> </tr> -->
<tr class="editformcell">
<td valign="bottom" colspan="2">
<b>Contact Email Address</b> <i>contact form submissions will be sent to this address</i><br />
<input type="text" name="ContactMail" value="<form:value name="ContactMail"/>" ${longField} maxlength="255" />
<font color="red"><form:error name="ContactMail"/></font>
</td>
</tr> <label>Contact email address <span class="note">contact form submissions will be sent to this address</span></label>
<tr class="editformcell"> <input type="text" name="ContactMail" value="<form:value name="ContactMail"/>" ${longField} maxlength="255" size="30" />
<td valign="top" colspan="2"> <font color="red"><form:error name="ContactMail"/></font>
<b>Theme</b><br /> <br />
<label class="display-inline">Theme</label>
<select id="ThemeDir" name="ThemeDir"> <select id="ThemeDir" name="ThemeDir">
<form:option name="ThemeDir" /> <form:option name="ThemeDir" />
</select> </select>
<font color="red"><form:error name="ThemeDir"/></font> <font color="red"><form:error name="ThemeDir"/></font>
</td>
</tr>
<tr class="editformcell"> <label>Copyright text<span class="note"> used in footer (e.g., name of your institution)</span></label>
<td valign="bottom" colspan="2"> <input type="text" name="CopyrightAnchor" value="<form:value name="CopyrightAnchor"/>" ${longField} maxlength="120" size="40" />
<b>Copyright text</b> <i>used in footer (e.g., name of your institution)</i><br />
<input type="text" name="CopyrightAnchor" value="<form:value name="CopyrightAnchor"/>" ${longField} maxlength="120" />
<font color="red"><form:error name="CopyrightAnchor"/></font> <font color="red"><form:error name="CopyrightAnchor"/></font>
</td>
</tr> <label>Copyright URL<span class="note"> copyright text links to this URL</span></label>
<tr class="editformcell"> <input type="text" name="CopyrightURL" value="<form:value name="CopyrightURL"/>" ${longField} maxlength="120" size="30" />
<td valign="bottom" colspan="2">
<b>Copyright URL</b> <i>copyright text links to this URL</i><br />
<input type="text" name="CopyrightURL" value="<form:value name="CopyrightURL"/>" ${longField} maxlength="120" />
<font color="red"><form:error name="CopyrightURL"/></font> <font color="red"><form:error name="CopyrightURL"/></font>
</td>
</tr>
<!-- <!--
<tr class="editformcell"> <tr class="editformcell">
<td valign="bottom" colspan="4"> <td valign="bottom" colspan="4">
@ -79,37 +60,29 @@
</td> </td>
</tr> </tr>
--> -->
<tr class="editformcell hideFromVivoWeb"> <!--
<td valign="bottom" colspan="1"> <label>Banner image</label>
<b>Banner image</b><br />
<input type="text" name="BannerImage" value="<form:value name="BannerImage"/>" style="width:90%" maxlength="255" /> <input type="text" name="BannerImage" value="<form:value name="BannerImage"/>" style="width:90%" maxlength="255" />
<font color="red"><form:error name="BannerImage"/></font> <font color="red"><form:error name="BannerImage"/></font>
</td>
<td valign="bottom" colspan="1"> <label>Banner image width</label>
<b>Banner image width</b><br />
<input type="text" name="BannerWidth" value="<form:value name="BannerWidth"/>" ${smallCell} maxlength="11" /> <input type="text" name="BannerWidth" value="<form:value name="BannerWidth"/>" ${smallCell} maxlength="11" />
<font color="red"><form:error name="BannerWidth"/></font> <font color="red"><form:error name="BannerWidth"/></font>
</td>
<td valign="bottom" colspan="1"> <label>Banner image height</label>
<b>Banner image height</b><br />
<input type="text" name="BannerHeight" value="<form:value name="BannerHeight"/>" ${smallCell} maxlength="11" /> <input type="text" name="BannerHeight" value="<form:value name="BannerHeight"/>" ${smallCell} maxlength="11" />
<font color="red"><form:error name="BannerHeight"/></font> <font color="red"><form:error name="BannerHeight"/></font>
</td>
</tr> <label>Logotype image</label>
<tr class="editformcell hideFromVivoWeb">
<td valign="bottom" colspan="1">
<b>Logotype image</b><br />
<input type="text" name="LogotypeImage" value="<form:value name="LogotypeImage"/>" style="width:90%" maxlength="255" /> <input type="text" name="LogotypeImage" value="<form:value name="LogotypeImage"/>" style="width:90%" maxlength="255" />
<font color="red"><form:error name="LogotypeImage"/></font> <font color="red"><form:error name="LogotypeImage"/></font>
</td>
<td valign="bottom" colspan="1"> <label>Logotype image width</label>
<b>Logotype image width</b><br />
<input type="text" name="LogotypeWidth" value="<form:value name="LogotypeWidth"/>" ${smallCell} maxlength="11" /> <input type="text" name="LogotypeWidth" value="<form:value name="LogotypeWidth"/>" ${smallCell} maxlength="11" />
<font color="red"><form:error name="LogotypeWidth"/></font> <font color="red"><form:error name="LogotypeWidth"/></font>
</td>
<td valign="bottom" colspan="1"> <label>Logotype image height</label>
<b>Logotype image height</b><br />
<input type="text" name="LogotypeHeight" value="<form:value name="LogotypeHeight"/>" ${smallCell} maxlength="11" /> <input type="text" name="LogotypeHeight" value="<form:value name="LogotypeHeight"/>" ${smallCell} maxlength="11" />
<font color="red"><form:error name="LogotypeHeight"/></font> <font color="red"><form:error name="LogotypeHeight"/></font>
</td>
</tr> -->