head	1.8;
access;
symbols;
locks; strict;
comment	@# @;


1.8
date	2001.08.30.00.54.47;	author dlr;	state Exp;
branches;
next	1.7;

1.7
date	2001.08.13.19.36.18;	author leonardr;	state Exp;
branches;
next	1.6;

1.6
date	2001.08.04.02.01.31;	author tfahrner;	state Exp;
branches;
next	1.5;

1.5
date	2001.07.26.18.40.07;	author leonardr;	state Exp;
branches;
next	1.4;

1.4
date	2001.07.18.22.09.44;	author leonardr;	state Exp;
branches;
next	1.3;

1.3
date	2001.07.18.16.04.10;	author leonardr;	state Exp;
branches;
next	1.2;

1.2
date	2001.07.17.23.20.23;	author leonardr;	state Exp;
branches;
next	1.1;

1.1
date	2001.07.16.23.22.09;	author leonardr;	state Exp;
branches;
next	;


desc
@@


1.8
log
@#errorList() macro is now in the global library.
@
text
@#errorList("Fatal error" "true" $fatalErrors)
#errorList("Error" "true" $errors)
#if ($userInputChecked)
 #errorList("Missing field" "true" $missingFields)
 #errorList("Validation error" "true" $validationErrors)
#end
#errorList("Message" "false" $messages)
@


1.7
log
@Got rid of debug
@
text
@a0 30
#macro(errorList $type $showSingular $list)
 #if ($list)
  #set ($size = $list.size())
  #if ($size > 0)
 <div id="errors">
  <p>
   #if ($size == 1)
#if ($showSingular)
    ${type}:
    #end
   #else
    ${type}s:
   #end 
   </p>
  #end

  #if($size > 1)<ul>#end
  #foreach ($error in $list)
   #if ($size > 1)
    <li><strong class="alert">$error</strong></li>
   #else
    <p><strong class="alert">$error</strong></p>
   #end
  #end
  #if($size > 1)</ul>#end
  #if ($size > 0) </div>
  #end
 #end
#end

@


1.6
log
@various ui/layout revisions
@
text
@d9 1
a9 1
    foo${type}:
d12 1
a12 1
    bar${type}s:
@


1.5
log
@Put types of errors in separate paragraphs.
@
text
@a1 1
 <p>
d5 2
d8 2
a9 2
    #if ($showSingular)
     ${type}:
d12 3
a14 2
    ${type}s:
   #end
d20 1
a20 1
    <li>$error</li>
d22 1
a22 1
    $error
d26 2
a28 1
 </p>
@


1.4
log
@Returning VelociMacro I foolishly removed earlier, in improved form.
@
text
@d2 1
d25 1
@


1.3
log
@Tweaked the error handling system to make it work like it did before. Bizarrely, there appears to be a built-in Velocimacro called errorList which does exactly the same thing as the errorList I wrote.
@
text
@d1 27
a27 2
#errorList("Fatal error" $fatalErrors)
#errorList("Error" $errors)
d29 2
a30 2
 #errorList("Missing field"  $missingFields)
 #errorList("Validation error" $validationErrors)
d32 1
a32 9

##We don't want "Message: foo" to show up, just the message.
#if ($messages)
 #if ($messages.size() > 1)
  #errorList("Message" $messages)
 #else
  <p>$messages.get(0)
 #end
#end@


1.2
log
@Added flag so that you can signal when missing fields are important errors and when they're not.
@
text
@a0 21
#macro(errorList $type $list)
 #set ($size = $list.size())
 #if ($size > 0)
  #if ($size == 1)
   ${type}:
  #else
   ${type}s:
  #end

  #if($size > 1)<ul>#end
  #foreach ($error in $list)
   #if ($size > 1)
    <li>$error</li>
   #else
    $error
   #end
  #end
  #if($size > 1)</ul>#end
 #end
#end

d3 3
a5 2
#if ($missingFieldsRequired)
 #errorList("Missing field" $missingFields)
d7 9
a15 2
 #errorList("Validation error" $validationErrors)
#errorList("Message" $messages)
@


1.1
log
@More changes to and first use of new error-handling system.
@
text
@d24 4
a27 2
#errorList("Missing field" $missingFields)
#errorList("Validation error" $validationErrors)
@

