Anonymous avatar Anonymous committed 826b399

WW-660: xhtml's checkbox.vm vertical alignment.

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@574 573baa09-0c28-0410-bef9-dab3c582ae83

Comments (0)

Files changed (2)

src/java/template/xhtml/checkbox.vm

   #set ($hasFieldErrors = $fieldErrors.get($parameters.name))
   #foreach ($error in $fieldErrors.get($parameters.name))
     <tr>
-        <td align="left" valign="top" colspan="2"><span class="errorMessage">$!error</span></td>
+        <td align="left" valign="middle" colspan="2"><span class="errorMessage">$!error</span></td>
     </tr>
   #end
 #end
 
 <tr>
-    <td  valign="top" colspan="2">
+    <td valign="middle" colspan="2">
 #* Use an extra table so that the checkbox doesn't align with the other columns. *#
 <table width="100%" border="0" cellpadding="0" cellspacing="0">
     <tr>
-        <td valign="top">#parse("/template/simple/checkbox.vm")</td>
-        <td width="100%" valign="top"><label #if ($parameters.id) for="$!webwork.htmlEncode($parameters.id)"#end#if ($hasFieldErrors) class="checkboxErrorLabel"#else class="checkboxLabel"#end>$!webwork.htmlEncode($parameters.label)</label></td>
+        <td valign="middle">#parse("/template/simple/checkbox.vm")</td>
+        <td width="100%" valign="middle"><label #if ($parameters.id) for="$!webwork.htmlEncode($parameters.id)"#end#if ($hasFieldErrors) class="checkboxErrorLabel"#else class="checkboxLabel"#end>$!webwork.htmlEncode($parameters.label)</label></td>
     </tr>
 </table>
 #parse("/template/xhtml/controlfooter.vm")

src/java/template/xhtml/controlheader.vm

   #set ($hasFieldErrors = $fieldErrors.get($parameters.name))
   #foreach ($error in $fieldErrors.get($parameters.name))
     <tr>
-        #if ($parameters.labelposition == 'top')<td align="left" valign="top" colspan="2">#else<td align="center" valign="top" colspan="2">#end<span class="errorMessage">$!webwork.htmlEncode($error)</span></td>
+        #if ($parameters.labelposition == 'top')<td align="left" valign="middle" colspan="2">#else<td align="center" valign="middle" colspan="2">#end<span class="errorMessage">$!webwork.htmlEncode($error)</span></td>
     </tr>
   #end
 #end
 ## if the label position is top,
 ## then give the label it's own row in the table
 <tr>
-#if ($parameters.labelposition == 'top')<td align="left" valign="top" colspan="2">#else<td align="right" valign="top">#end#if ($parameters.label)<label #if ($parameters.id) for="$!webwork.htmlEncode($parameters.id)"#end#if ($hasFieldErrors) class="errorLabel"#else class="label"#end>#if ($parameters.required)<span class="required">*</span>#end$!webwork.htmlEncode($parameters.label):</label>#end</td>
+#if ($parameters.labelposition == 'top')<td align="left" valign="middle" colspan="2">#else<td align="right" valign="middle">#end#if ($parameters.label)<label #if ($parameters.id) for="$!webwork.htmlEncode($parameters.id)"#end#if ($hasFieldErrors) class="errorLabel"#else class="label"#end>#if ($parameters.required)<span class="required">*</span>#end$!webwork.htmlEncode($parameters.label):</label>#end</td>
 ## add the extra row
 #if ($parameters.labelposition == 'top')
 </tr>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.