Commit 6b9e02e9 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Fix flyspray bug #61 ... its ugly. This form needs to be redone using

the new form stuff, but that would have taken way too long.
parent ea0a6935
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2007 University of Utah and the Flux Group.
# Copyright (c) 2000-2008 University of Utah and the Flux Group.
# All rights reserved.
#
include("defs.php3");
......@@ -110,12 +110,34 @@ if (! $this_project->IsMember($leader, $ignore)) {
# Well, looks like everything is okay. Change the project approval
# value appropriately.
#
if (strcmp($approval, "postpone") == 0) {
if (isset($message) && strcmp($message, "")) {
USERERROR("You requested postponement for $pid, but there is a ".
"message in the text box which will vanish. If that is ".
"not what you intended, the back button will give you ".
"another chance, with text intact.", 1);
if ($approval == "postpone") {
if (isset($message) && $message != "") {
echo "<table class=stealth align=center border=0>";
echo "<tr><td class=stealth>";
echo "You requested postponement for $pid, but there is a ".
"message in the text box which will vanish. If that is ".
"not what you intended, the Back button below will give you ".
"another chance, with text intact";
echo "</td></tr>";
echo "<tr><td class=stealth align=center>";
echo "<form action='approveproject_form.php3?project=$pid'
method=post>";
if (isset($head_uid)) {
echo "<input type=hidden name=head_uid value=$head_uid>\n";
}
echo "<input type=hidden name=user_interface value=$user_interface>\n";
echo "<input type=hidden name=silent value=$silent>\n";
echo "<input type=hidden name=pcplab_okay value=$pcplab_okay>\n";
echo "<input type=hidden name=ron_okay value=$ron_okay>\n";
echo "<input type=hidden name=message value='".
htmlspecialchars($message) . "'>\n";
echo "<b><input type=submit name=back value=Back></b>\n";
echo "</form>\n";
echo "</td></tr></table>";
PAGEFOOTER();
return;
}
echo "<p><h3>
Project approval for project $pid (User: $headuid) was
......
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2007 University of Utah and the Flux Group.
# Copyright (c) 2000-2008 University of Utah and the Flux Group.
# All rights reserved.
#
include("defs.php3");
......@@ -29,6 +29,13 @@ if (! $isadmin) {
# Verify page arguments.
#
$reqargs = RequiredPageArguments("project", PAGEARG_PROJECT);
$optargs = OptionalPageArguments("head_uid", PAGEARG_STRING,
"user_interface", PAGEARG_STRING,
"message", PAGEARG_ANYTHING,
"silent", PAGEARG_BOOLEAN,
"pcplab_okay", PAGEARG_BOOLEAN,
"ron_okay", PAGEARG_BOOLEAN,
"back", PAGEARG_STRING);
#
# Check to make sure thats this is a valid PID.
......@@ -129,8 +136,9 @@ echo "
echo "<tr>
<td align=center>
<input type=checkbox value=Yep
name=silent>Silent (no email sent for deny,destroy)
<input type=checkbox value=Yep ".
((isset($silent) && $silent == "Yep") ? "checked " : " ") .
"name=silent>Silent (no email sent for deny,destroy)
</td>
</tr>\n";
......@@ -149,8 +157,9 @@ $allmembers = $this_project->MemberList();
foreach ($allmembers as $other_user) {
$this_uid = $other_user->uid();
$this_webid = $other_user->webid();
$sel = ((isset($head_uid) && $head_uid == $this_webid) ? "selected" : "");
echo " <option value='$this_webid'>$this_uid</option>\n";
echo " <option $sel value='$this_webid'>$this_uid</option>\n";
}
echo " </select>
</td>
......@@ -165,7 +174,10 @@ echo "<tr>
<select name=user_interface>\n";
foreach ($TBDB_USER_INTERFACE_LIST as $interface) {
echo " <option value='$interface'>$interface</option>\n";
$sel = ((isset($user_interface) &&
$user_interface == $interface) ? "selected" : "");
echo " <option $sel value='$interface'>$interface</option>\n";
}
echo " </select>
</td>
......@@ -181,16 +193,26 @@ $num_pcplab = $this_project->num_pcplab();
$num_ron = $this_project->num_ron();
if ($num_ron || $num_pcplab) {
# Default these on.
if (!isset($back)) {
$pcplab_okay = "Yep";
$ron_okay = "Yep";
}
echo "<tr>
<td align=center>\n";
if ($num_pcplab) {
echo "<input type=checkbox value=Yep checked
name=pcplab_okay>
echo "<input type=checkbox value=Yep ".
((isset($pcplab_okay) && $pcplab_okay == "Yep")
? "checked " : " ") .
" name=pcplab_okay>
Allow Plab &nbsp\n";
}
if ($num_ron) {
echo "<input type=checkbox value=Yep checked
name=ron_okay>
echo "<input type=checkbox value=Yep ".
((isset($ron_okay) && $ron_okay == "Yep")
? "checked " : " ") .
" name=ron_okay>
Allow RON (PCWA) &nbsp\n";
}
echo " </td>
......@@ -204,7 +226,11 @@ echo "<tr>
echo "<tr>
<td align=center class=left>
<textarea name=message rows=15 cols=70></textarea>
<textarea name=message rows=15 cols=70>";
if (isset($message)) {
echo ereg_replace("\r", "", $message);
}
echo "</textarea>
</td>
</tr>\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