#---------------------------------------------------------
# Configuration file for signup.pl

# General parameters
$SendMail = "/path/to/sendmail";
$sep      = ';';
$listsep  = ', ';

# Mail parameters
$To       = 'target1@example.org, target2@example.org, {{email}}';
$ReplyTo  = 'webmaster@example.org, {{email}}';
$Subject  = 'Test Signup - {{volunteer}}';
$From     = 'signup@example.org';

#---------------------------------------------------------
#  Transformation parameters
#
#  Applied to fields of the form "top;child;grandchild"
#
#  -listsep      = output separator for simple list items
#  -pretree      = write before tree output
#  -posttree     = write after tree output
#  -preitem      = before each item in the tree
#  -postitem     = after each item in the tree
#  -addpre       = prepended to the -preitem for a new level
#  -pretopitem   = written before -preitem on the upper-most items
#  -posttopitem  = written after -postitem on the upper-most items
#  -prechildren  = written before output of child elements
#  -postchildren = written after output of child elements

# Transformation for text output
%text_format =
 (
  -listsep      => $listsep,
  -pretree      => "\n",
  -posttree     => "",
  -preitem      => '',
  -postitem     => "\n",
  -addpre       => "\t",
  -pretopitem   => "",
  -posttopitem  => '', 
  -prechildren  => "\n",
  -postchildren => '', 
 );

# Transformation for html output
%html_format =
 (
  -listsep      => $listsep,
  -pretree      => "\n<ul>",
  -posttree     => "</ul>\n",
  -preitem      => "<li>",
  -postitem     => "</li>\n",
  -addpre       => "  ",
  -pretopitem   => "\n",
  -posttopitem  => "", 
  -prechildren  => "\n<ul>\n",
  -postchildren => "</ul>",
 );


@RequiredParameters = ('volunteer', 'email', 'shift' );

#-----------------------------------------------------
# Templates are raw text except for the magical tokens
# of the form {{name}}, these will be extracted from
# the parameter to the script with the name 'name'.
#
# The $ErrorTemplate also supports an extra magic token
# {$errormsg$}. This token is replaced with the error
# message reported to the user.

# Template for building mail messages
$MailTemplate = <<'EOT';
Hello {{volunteer}} ({{email}}),

Thank you for signing up for the shifts listed below:
{{shift}}
Festival Experience? {{experience}}

Alcohol? {{alcohol}}

Comments:
{{comment}}

This message was automatically generated by the computer.
For more information on this event, please reply to this
message or visit www.example.org/volunteer/festival.
EOT

# Template for building confirmation page
$PageTemplate = <<'EOT';
<html>
<head>
<title>Example - Thanks for Signing Up for the Festival!</title>
</head>

<body bgcolor="white">

<p align="center"><a href="http://www.example.org/">Example Org</a></p>

<p align="center"><b><font face="Comic Sans MS" size="4">Festival</font></b></p>

  <center>
<p>Thanks for signing up, {{volunteer}}. If {{email}} is a valid email address for you, you will also receive a confirmation there. (If it's not, please sign up again using a valid email address.)</p>

<p>As the festival approaches, Example will be in touch with more information. In the meantime, please note the following shifts on your calendar:</p>

<blockquote>

<p>{{shift}}</p>

<p>Feel free to print or save this page as a reminder.</p>

</blockquote>

        </font>
</body>
</html>
EOT

# Template for building error page
$ErrorTemplate = <<'EOT';
<html>
<head>
<title>An Error Occurred</title>
</head>
<body bgcolor="white">

<p align="center">Example Org</a></p>

<p align="center"><b>An error occurred.</b></p>
<p>{$errormsg$}</p>

</body>
</html>
EOT

1;
