continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r209708 - in /maven/continuum/trunk/continuum-web/src/main/resources/templates: CommonMacros.vm screens/Add.vm
Date Fri, 08 Jul 2005 05:50:10 GMT
Author: jvanzyl
Date: Thu Jul  7 22:50:10 2005
New Revision: 209708

URL: http://svn.apache.org/viewcvs?rev=209708&view=rev
Log:
o changing the way errors are displayed

Modified:
    maven/continuum/trunk/continuum-web/src/main/resources/templates/CommonMacros.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Add.vm

Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/CommonMacros.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/CommonMacros.vm?rev=209708&r1=209707&r2=209708&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/CommonMacros.vm (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/CommonMacros.vm Thu Jul
 7 22:50:10 2005
@@ -4,14 +4,22 @@
 
 #macro ( field $i18n $data $element $item $formtool )
 <th>$i18n.getString( $element.labelKey )</th>
-<td>
+
+#if ( $fvr && !$fvr.getElementResult( $element.getId()).valid() )
+  #set ( $errorMsg = "&nbsp;&nbsp; [ $fvr.getElementResult( $element.getId() ).errorMessage
] " )
+  #set ( $attr = 'style="background-color: #ffffcc"' )
+#end
+
+<td $attr>
   #set ( $elementData = $formtool.getElementData( $form, $element, $item, $data ) )
   #if ( $element.type == "text" )
     #text( $element $elementData )
   #elseif ( $element.type == "upload" )
     #upload( $element $elementData )
   #end
-  <p>$i18n.getString( $element.messageKey )</p>
+  <p>
+    $i18n.getString( $element.messageKey ) <font color="red"><b>$!errorMsg</b></font>
+  </p>
 </td>
 #end
 

Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Add.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Add.vm?rev=209708&r1=209707&r2=209708&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Add.vm (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Add.vm Thu Jul
 7 22:50:10 2005
@@ -14,7 +14,7 @@
           #if ( !$element.immutable )
           <tr>
             #field( $i18n $data $element $item $formtool )
-            #validateField( $fvr $element )
+            ##validateField( $fvr $element )
           </tr>
           #else
             #if ( $element.defaultValue )



Mime
View raw message