Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
UCommWebforms
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Experience Group
UCommWebforms
Commits
aa05da92
Commit
aa05da92
authored
14 years ago
by
Eric Rasmussen
Browse files
Options
Downloads
Patches
Plain Diff
Add logic for select box; Change from/to config for email
parent
ddbf897a
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
config-landscape-outdoorevents.sample.php
+4
-3
4 additions, 3 deletions
config-landscape-outdoorevents.sample.php
www/landscape/outdoorevents/index.php
+94
-34
94 additions, 34 deletions
www/landscape/outdoorevents/index.php
with
98 additions
and
37 deletions
config-landscape-outdoorevents.sample.php
+
4
−
3
View file @
aa05da92
...
...
@@ -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'
);
...
...
This diff is collapsed.
Click to expand it.
www/landscape/outdoorevents/index.php
+
94
−
34
View file @
aa05da92
...
...
@@ -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
.
=
"<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
.
=
"<h
5
>Contact Information</h
5
>"
;
$body
.
=
"<h
3
>Contact Information</h
3
>"
;
$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
.
=
"<h
5
>Event Requirements</h
5
>"
;
$body
.
=
"<h
3
>Event Requirements</h
3
>"
;
$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
.
=
"<h
5
>Other Information</h
5
>"
;
$body
.
=
"<h
3
>Other Information</h
3
>"
;
$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.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,6 +157,7 @@ width:120px;
#maincontent .infoBox {
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(
...
...
@@ -155,6 +187,22 @@ 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">
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment