Commit 9075e458 authored by Leigh B Stoller's avatar Leigh B Stoller

Display a warning if the extension request (days) would be a

violation of what the reservation system says is allowed.
parent 531f1a9e
......@@ -267,11 +267,24 @@ function (_, sup, moment, ShowIdleGraphs,
var callback = function(json) {
if (json.code) {
alert("Failed to change lockdown: " + json.value);"Failed to get max extension: " + json.value);
* Look to see if the number of days requested is going to be
* greater then the max slice extension. If it is, then we want
* to make sure that is noticed.
var now = new Date();
var max = new Date(json.value);
now.setDate(now.getDate() + window.DAYS);
if (now.getTime() > max.getTime()) {
alert("Granting this full extension would violate the " +
"current maximum allowed extension.");
var xmlthing = sup.CallServerMethod(null, "status", "MaxExtension",
{"uuid" : window.UUID});
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment