Commit 864c89c5 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Add silent option to project denial.

parent 3f18341f
......@@ -273,7 +273,10 @@ function Do_Deny()
}
$message = $ajax_args["message"];
$deleteuser = ($ajax_args["deleteuser"] == 1 ? 1 : 0);
$silent = 0;
if (isset($ajax_args["silent"]) && $ajax_args["silent"] == 1) {
$silent = 1;
}
if (! ($leader = $project->GetLeader())) {
TBERROR("Error getting leader for $pid", 0);
SPITAJAX_ERROR(-1, "Internal error getting project leader");
......@@ -333,17 +336,18 @@ function Do_Deny()
"see the email sent to your testbed-ops list");
return;
}
# This works cause we still have the project object in memory.
SendProjAdminMail
($project, "ADMIN", "$headname '$headuid' <$headuid_email>",
"Project application '$pid' has been denied!",
"This message is to notify you that your project application\n".
"for $pid has been denied.\n".
($message == "" ? "" :
"----------------------------------------------------------------\n".
"\n".
$message . "\n"));
if (!$silent) {
# This works cause we still have the project object in memory.
SendProjAdminMail
($project, "ADMIN", "$headname '$headuid' <$headuid_email>",
"Project application '$pid' has been denied!",
"This message is to notify you that your project application\n".
"for $pid has been denied.\n".
($message == "" ? "" :
"----------------------------------------------------------------\n".
"\n".
$message . "\n"));
}
SPITAJAX_RESPONSE(0);
}
......
......@@ -246,7 +246,8 @@ $(function ()
sup.HideModal("#deny-modal");
var message = $('#deny-body').val();
var deleteuser = ($('#deny-delete-user').is(":checked") ? 1 : 0);
console.info("Deny", pid, message, deleteuser);
var silent = ($('#deny-silent').is(":checked") ? 1 : 0);
console.info("Deny", pid, message, deleteuser, silent);
var callback = function(json) {
sup.HideWaitWait();
......@@ -265,7 +266,8 @@ $(function ()
"Deny",
{"pid" : pid,
"message" : message,
"deleteuser" : deleteuser});
"deleteuser" : deleteuser,
"silent" : silent});
xmlthing.done(callback);
}
......
<style>
.tablesorter .filtered {
display: none;
}
</style>
<div class='row'>
<div class='col-lg-12 col-lg-offset-0
col-md-12 col-md-offset-0
......
......@@ -117,8 +117,10 @@
placeholder="Please enter a message" type="text"></textarea>
</div>
<center>
Delete user account?<br>
<input type=checkbox id=deny-delete-user value=yes checked>
Delete user account?<br>
<input type=checkbox id=deny-silent value=yes>
Silent (no email)?<br>
</center>
<br>
<center>
......
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