diff --git a/config-landscape-outdoorevents.sample.php b/config-landscape-outdoorevents.sample.php index a2c34dea4e0e7135c66f240d11067c00a302b6e8..f020fb37fa20581470aa78651b03e5899fd68714 100644 --- a/config-landscape-outdoorevents.sample.php +++ b/config-landscape-outdoorevents.sample.php @@ -18,9 +18,10 @@ function myautoload($class) require_once $file; } -$sendToEmail = "jdoe1@unl.edu"; -$sendToEmailDev= "appdev1@unl.edu"; -$sendFromEmail = "no-reply@ucommxsrv1.unl.edu"; //Will send email from this address. +$sendToEmail = "jdoe1@unl.edu"; //Contact person who is collecting data +$sendToEmailBackup = "sdoe2@unl.edu"; //Backup contact, set to NULL if not wanted +$sendToEmailDev= "appdev1@unl.edu"; //Application developer as a backup +$sendFromEmail = $sendToEmail; //Will send email from this address. $emailSubject = "UNL Outdoor Event Space Request"; //Subject for the email. spl_autoload_register('myautoload'); diff --git a/www/landscape/outdoorevents/index.php b/www/landscape/outdoorevents/index.php index 482e8598691e2954d5104eb956e7423b0ce787c8..53a98ede58976f88edaf6bfa2052f8a298f45648 100644 --- a/www/landscape/outdoorevents/index.php +++ b/www/landscape/outdoorevents/index.php @@ -7,8 +7,12 @@ if (file_exists(dirname(__FILE__).'/../../../config-landscape-outdoorevents.inc. if (!empty($_POST)) { $mailer = new UNL_WDN_Emailer_Main(); - $body .= "<h5>Event Information</h5>"; - $body .= "<strong>Location:</strong> " . $_POST['location'] . "<br/>"; + $body .= "<h3>Event Information</h3>"; + if (isset($_POST['location_other'])) { + $body .= "<strong>Location:</strong> " . $_POST['location_other'] . "<br/>"; + } else { + $body .= "<strong>Location:</strong> " . $_POST['location'] . "<br/>"; + } $body .= "<strong>Begin Date:</strong> " . $_POST['begindate_month']."/".$_POST['begindate_day']."/".$_POST['begindate_year']. " "; $body .= "<strong>End Date:</strong> " . $_POST['enddate_month']."/".$_POST['enddate_day']."/".$_POST['enddate_year']. "<br/>"; $body .= "<strong>Title of Event:</strong> " . $_POST['title'] . "<br/>"; @@ -18,7 +22,7 @@ if (!empty($_POST)) { $body .= "<strong>Expected Attendance:</strong> " . $_POST['attendance'] . "<br/>"; $body .= "<strong>Sponsor:</strong> " . $_POST['sponsor'] . "<br/>"; - $body .= "<h5>Contact Information</h5>"; + $body .= "<h3>Contact Information</h3>"; $body .= "<strong>Name:</strong> " . $_POST['name'] . "<br/>"; $body .= "<strong>Email:</strong> " . $_POST['email'] . "<br/>"; $body .= "<strong>Address:</strong> " . $_POST['streetaddress'] . "<br/>"; @@ -27,12 +31,12 @@ if (!empty($_POST)) { $body .= "<strong>Home Phone:</strong> " . $_POST['home'] . "<br/>"; $body .= "<strong>Fax:</strong> " . $_POST['fax'] . "<br/>"; - $body .= "<h5>Event Requirements</h5>"; + $body .= "<h3>Event Requirements</h3>"; $body .= "<strong>Litter Containers:</strong> " . $_POST['litter_number'] . "<br/>"; $body .= "<strong>Picnic Tables:</strong> " . $_POST['picnic_number'] . "<br/>"; $body .= "<strong>Electricity Hookup:</strong> " . $_POST['electricity'] . "<br/>"; - $body .= "<h5>Other Information</h5>"; + $body .= "<h3>Other Information</h3>"; $body .= "<strong>Bad Weather Contingency:</strong> " . $_POST['weather'] . "<br/>"; $body .= "<strong>Additional Comments:</strong> " . $_POST['comments'] . "<br/>"; @@ -42,9 +46,17 @@ if (!empty($_POST)) { $mailer->from_address = $sendFromEmail; $mailer->subject = $emailSubject; $mailer->send(); + + + $mailer->from_address = $_POST['email']; // Send to head of Landscape Services $mailer->to_address = $sendToEmail; $mailer->send(); + // Send to backup contact + if (!empty($sendToEmailBackup)) { + $mailer->to_address = $sendToEmailBackup; + $mailer->send(); + } // Send another copy to the developer as a backup $mailer->to_address = $sendToEmailDev; $mailer->send(); @@ -61,8 +73,27 @@ $page->head .= file_get_contents('http://www.unl.edu/landscape/share $page->head .= <<<EOF <script type="text/javascript"> //<![CDATA[ - WDN.jQuery(document).ready(function(){ - WDN.initializePlugin('zenform'); + WDN.jQuery(document).ready(function($){ + WDN.initializePlugin('zenform'); + $('#location').change(function() { + if ($(this).val() == 'lied' || + $(this).val() == 'union' || + $(this).val() == 'meier' || + $(this).val() == 'sheldon' || + $(this).val() == 'wick') { + $('#location_message').show(); + $('#location_other_li').hide(); + $('#submit').hide(); + } else if ($(this).val() == 'other') { + $('#location_message').hide(); + $('#location_other_li').show(); + $('#submit').show(); + } else { + $('#location_message').hide(); + $('#location_other_li').hide(); + $('#submit').show(); + } + }); }); //]]> </script> @@ -126,34 +157,51 @@ width:120px; #maincontent .infoBox { --moz-box-shadow:0 2px 3px #999999; --webkit-box-shadow:0 2px 3px #999999; -background-image:-moz-linear-gradient( - center bottom, - #ACED80 1%, - #C7FCA3 20% -); -background-image:-webkit-gradient( - linear, - left bottom, - left top, - color-stop(0.44, rgb(172,237,128)), - color-stop(0.72, rgb(199,252,163)) -); -background-color:#C7FCA3; -border:1px solid #DCDCDC; -font-size:1.1em; -margin-bottom:20px; -padding:20px 40px 10px; -position:relative; -font-family:ShinnBold,"Trebuchet MS",Tahoma,Arial,sans-serif; -color:#333333; + box-shadow:0 2px 3px #999999; + -moz-box-shadow:0 2px 3px #999999; + -webkit-box-shadow:0 2px 3px #999999; + background-image:-moz-linear-gradient( + center bottom, + #ACED80 1%, + #C7FCA3 20% + ); + background-image:-webkit-gradient( + linear, + left bottom, + left top, + color-stop(0.44, rgb(172,237,128)), + color-stop(0.72, rgb(199,252,163)) + ); + background-color:#C7FCA3; + border:1px solid #DCDCDC; + font-size:1.1em; + margin-bottom:20px; + padding:20px 40px 10px; + position:relative; + font-family:ShinnBold,"Trebuchet MS",Tahoma,Arial,sans-serif; + color:#333333; } #maincontent .infoBox h3 { -line-height:1.3em; -margin-bottom:10px; -font-family:ShinnBold,"Trebuchet MS",Tahoma,Arial,sans-serif; -color:#555555; + line-height:1.3em; + margin-bottom:10px; + font-family:ShinnBold,"Trebuchet MS",Tahoma,Arial,sans-serif; + color:#555555; +} +#maincontent .infoBox#location_message { + background: #ac0302; + color: #ffffff; +} +#maincontent .infoBox#location_message h3 { + color: #fff; +} +#maincontent .infoBox#location_message a { + color: #fff; + text-decoration: underline; +} + +/* THINGS TO HIDE ON LOAD */ +#location_message, #location_other_li { + display: none; } </style> EOF; @@ -206,6 +254,18 @@ $page->maincontentarea = <<<EOF <option value="other">Other...</option> </select> </li> + <li id="location_message" class="infoBox"> + <h3>NOTICE</h3> + <p>This location's outdoor events are not arranged through Landscape Services.</p> + <p>Please contact them directly. <a href="http://www.unl.edu/unlspecialevents">Contact info available here</a></p> + </li> + <li style="clear:left" id="location_other_li"> + <label for="location_other"> + <span class="required">*</span> + Please specify location: + </label> + <input type="text" id="location_other" name="location_other" /> + </li> <li style="float:left"> <label for="begindate_month"> <span class="required">*</span> @@ -502,7 +562,7 @@ $page->maincontentarea .= <<<EOF </li> </ol> </fieldset> - <input type="submit" name="submit" value="Submit" /> + <input type="submit" name="submit" value="Submit" id="submit" /> </form> </div> <div class="col right">