Commit a4d2769f authored by Leigh Stoller's avatar Leigh Stoller

Minor UI fixes to reservation deletion.

parent d390b802
......@@ -463,9 +463,15 @@ sub DoList()
APT_Geni::PortalRPC($authority, $context, "Reservations", (\%rpcargs));
if (GeniResponse::IsError($response)) {
#
# All errors are fatal.
# Do not throw a fatal error if we get a search failure, no need
# to send any email.
#
fatal($response->output());
if (defined($uuid) && $response->code() == GENIRESPONSE_SEARCHFAILED) {
UserError($response->output());
}
else {
fatal($response->output());
}
}
my $list = $response->value()->{'reservations'};
my $history = $response->value()->{'history'}
......
......@@ -531,6 +531,8 @@ $(function ()
}
// Need this in Delete().
window.PID = details.pid;
// Now enable delete button
$('#reserve-delete-button').removeAttr("disabled");
};
sup.ShowWaitWait();
var xmlthing = sup.CallServerMethod(null, "reserve",
......
......@@ -677,10 +677,16 @@ function Do_GetReservation()
$retval = SUEXEC($this_uid, "nobody",
"webmanage_reservations -a '$urn' ".
" -t $webtask_id list -i $uuid",
SUEXEC_ACTION_CONTINUE);
SUEXEC_ACTION_IGNORE);
if ($retval) {
$webtask->Delete();
SPITAJAX_ERROR(-1, $suexec_output);
if ($retval < 0) {
SUEXECERROR(SUEXEC_ACTION_CONTINUE);
SPITAJAX_ERROR(-1, $suexec_output);
}
else {
SPITAJAX_ERROR(1, $suexec_output);
}
return;
}
$webtask->Refresh();
......
......@@ -297,7 +297,7 @@
id='reserve-submit-button'
type='submit' name='submit'>Check</button>
<% if (editing) { %>
<button class='btn btn-danger btn-sm pull-left'
<button class='btn btn-danger btn-sm pull-left' disabled
style="margin-right: 10px"
id='reserve-delete-button'
type='submit' name='delete'>Delete</button>
......
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