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);
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("scripts","/templates/edit/formBasic.js");
request.setAttribute("title","Site Information Editing Form");
request.setAttribute("title","Site Information");
request.setAttribute("_action",action);
request.setAttribute("unqualifiedClassName","ApplicationBean");
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" %>
<div class="editingForm">
@ -19,20 +19,19 @@
<form id="editForm" name="editForm" action="${action}" method="post" onsubmit="${onSubmit}">
<input type="hidden" name="_epoKey" value="${epoKey}" />
<div align="center">
<table cellpadding="4" cellspacing="2">
<tr><th colspan="${colspan}">
<div class="entryFormHead">
<div>
<h2>${title}</h2>
<c:choose>
<c:when test='${_action == "insert"}'>
<h3>Creating New Record</h3>
<h3 class="blue">Creating New Record
</c:when>
<c:otherwise>
<h3>Editing Existing Record</h3>
<h3 class="blue">Editing Existing Record
</c:otherwise>
</c:choose>
<span class="entryFormHeadInstructions">(<sup>*</sup> Required Fields)</span>
<span class="note">(<sup>*</sup> Required Fields)</span></h3>
</div><!--entryFormHead-->
</th></tr>
@ -41,33 +40,32 @@
<jsp:include page="${formJsp}"/>
<tr class="editformcell">
<td colspan="${colspan}" align="center">
<td colspan="${colspan}">
<c:choose>
<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: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') }">
<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:otherwise>
</c:choose>
<input type="reset" class="form-button" value="Reset"/>
<input type="reset" class="delete" value="Reset"/>
<c:choose>
<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:otherwise>
<input type="submit" class="form-button" name="_cancel" value="Cancel"/>
<input type="submit" class="delete" name="_cancel" value="Cancel"/>
</c:otherwise>
</c:choose>
</td>
</tr>
</table>
</div><!--alignCenter-->
</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()); %>
<vitro:confirmAuthorization />
<c:set var="appNameLabel" value="Site Name"/>
<c:set var="smallCell" value="style='width: 33%;'" />
<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>
<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" />
<font color="red"><form:error name="ApplicationName"/></font>
<!-- 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">
@ -32,37 +23,27 @@
<font color="red"><form:error name="ShortHand"/></font>
</td>
</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>
<tr class="editformcell">
<td valign="top" colspan="2">
<b>Theme</b><br />
<label>Contact email address <span class="note">contact form submissions will be sent to this address</span></label>
<input type="text" name="ContactMail" value="<form:value name="ContactMail"/>" ${longField} maxlength="255" size="30" />
<font color="red"><form:error name="ContactMail"/></font>
<br />
<label class="display-inline">Theme</label>
<select id="ThemeDir" name="ThemeDir">
<form:option name="ThemeDir" />
</select>
<font color="red"><form:error name="ThemeDir"/></font>
</td>
</tr>
<tr class="editformcell">
<td valign="bottom" colspan="2">
<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" />
<label>Copyright text<span class="note"> used in footer (e.g., name of your institution)</span></label>
<input type="text" name="CopyrightAnchor" value="<form:value name="CopyrightAnchor"/>" ${longField} maxlength="120" size="40" />
<font color="red"><form:error name="CopyrightAnchor"/></font>
</td>
</tr>
<tr class="editformcell">
<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" />
<label>Copyright URL<span class="note"> copyright text links to this URL</span></label>
<input type="text" name="CopyrightURL" value="<form:value name="CopyrightURL"/>" ${longField} maxlength="120" size="30" />
<font color="red"><form:error name="CopyrightURL"/></font>
</td>
</tr>
<!--
<tr class="editformcell">
<td valign="bottom" colspan="4">
@ -79,37 +60,29 @@
</td>
</tr>
-->
<tr class="editformcell hideFromVivoWeb">
<td valign="bottom" colspan="1">
<b>Banner image</b><br />
<!--
<label>Banner image</label>
<input type="text" name="BannerImage" value="<form:value name="BannerImage"/>" style="width:90%" maxlength="255" />
<font color="red"><form:error name="BannerImage"/></font>
</td>
<td valign="bottom" colspan="1">
<b>Banner image width</b><br />
<label>Banner image width</label>
<input type="text" name="BannerWidth" value="<form:value name="BannerWidth"/>" ${smallCell} maxlength="11" />
<font color="red"><form:error name="BannerWidth"/></font>
</td>
<td valign="bottom" colspan="1">
<b>Banner image height</b><br />
<label>Banner image height</label>
<input type="text" name="BannerHeight" value="<form:value name="BannerHeight"/>" ${smallCell} maxlength="11" />
<font color="red"><form:error name="BannerHeight"/></font>
</td>
</tr>
<tr class="editformcell hideFromVivoWeb">
<td valign="bottom" colspan="1">
<b>Logotype image</b><br />
<label>Logotype image</label>
<input type="text" name="LogotypeImage" value="<form:value name="LogotypeImage"/>" style="width:90%" maxlength="255" />
<font color="red"><form:error name="LogotypeImage"/></font>
</td>
<td valign="bottom" colspan="1">
<b>Logotype image width</b><br />
<label>Logotype image width</label>
<input type="text" name="LogotypeWidth" value="<form:value name="LogotypeWidth"/>" ${smallCell} maxlength="11" />
<font color="red"><form:error name="LogotypeWidth"/></font>
</td>
<td valign="bottom" colspan="1">
<b>Logotype image height</b><br />
<label>Logotype image height</label>
<input type="text" name="LogotypeHeight" value="<form:value name="LogotypeHeight"/>" ${smallCell} maxlength="11" />
<font color="red"><form:error name="LogotypeHeight"/></font>
</td>
</tr>
-->