Commit d38cddeb authored by Leigh Stoller's avatar Leigh Stoller

Add a checkbox for "Will you add a link to us on your project page" as

requested by Jay. The info is sent in the email, but I am not
bothering to store it in the DB.
parent 9d6e3966
......@@ -32,7 +32,7 @@ else {
#
function SPITFORM($formfields, $returning, $errors)
{
global $TBDB_UIDLEN, $TBDB_PIDLEN;
global $TBDB_UIDLEN, $TBDB_PIDLEN, $TBDOCBASE, $WWWHOST;
global $usr_keyfile;
PAGEHEADER("Start a New Testbed Project");
......@@ -311,6 +311,20 @@ function SPITFORM($formfields, $returning, $errors)
</td>
</tr>\n";
#
# Will you add a link?
#
echo "<tr>
<td colspan=2>*Will you add a link on your project page
to <a href=\"$TBDOCBASE\">$WWWHOST</a>?
</td>
<td><input type=checkbox value=checked
name=\"formfields[proj_linked]\"
" . $formfields[proj_linked] . ">
Yes &nbsp
</td>
</tr>\n";
#
# Funders/Grant numbers
#
......@@ -439,6 +453,7 @@ if (! isset($submit)) {
$defaults[usr_URL] = "$HTTPTAG";
$defaults[proj_sharks] = "0";
$defaults[proj_public] = "checked";
$defaults[proj_linked] = "checked";
SPITFORM($defaults, $returning, 0);
PAGEFOOTER();
......@@ -607,6 +622,11 @@ if ((!isset($formfields[proj_public]) ||
strcmp($formfields[proj_whynotpublic], "") == 0)) {
$errors["Why Not Public?"] = "Missing Field";
}
if (isset($formfields[proj_linked]) &&
strcmp($formfields[proj_linked], "") &&
strcmp($formfields[proj_linked], "checked")) {
$errors["Link to Us"] = "Bad Value";
}
if (count($errors)) {
SPITFORM($formfields, $returning, $errors);
......@@ -708,6 +728,13 @@ else {
$proj_public = "Yes";
$public = 1;
}
if (!isset($formfields[proj_linked]) ||
strcmp($formfields[proj_linked], "checked")) {
$proj_linked = "No";
}
else {
$proj_linked = "Yes";
}
#
# Check that we can guarantee uniqueness of the unix group name.
......@@ -811,6 +838,7 @@ TBMAIL($TBMAIL_APPROVAL,
"Project URL: $proj_URL\n".
"Public URL: $proj_public\n".
"Why Not Public: $proj_whynotpublic\n".
"Link to Us?: $proj_linked\n".
"Funders: $proj_funders\n".
"Title: $usr_title\n".
"Affiliation: $usr_affil\n".
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment