Commits

Anonymous committed 826b399

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

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

  • Participants
  • Parent commits 6b9d804

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>