Kiosk intake: 45-second inactivity reset to Welcome screen
_KioskLayout inactivity timer now reads ViewBag.InactivityTimeoutMs (defaults to 5 min). PopulateKioskViewBagFromSession sets it to 45 s on every intake step so an abandoned form auto-returns to the waiting screen. Welcome screen and Confirmation page are unaffected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -717,5 +717,9 @@ public class KioskController : Controller
|
||||
|
||||
ViewBag.SessionToken = session.SessionToken;
|
||||
ViewBag.SessionType = session.SessionType;
|
||||
|
||||
// Reset to Welcome screen after 45 s of inactivity on any intake step.
|
||||
// The Welcome screen itself stays on indefinitely (no timeout override there).
|
||||
ViewBag.InactivityTimeoutMs = 45_000;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,16 +59,19 @@
|
||||
|
||||
</div>
|
||||
|
||||
@* Inactivity timer — redirect to Welcome after 5 minutes of no input *@
|
||||
@* Inactivity timer — redirect to Welcome when idle too long.
|
||||
Intake steps set ViewBag.InactivityTimeoutMs = 45000 (45 s).
|
||||
Welcome screen keeps the default 5-minute timeout. *@
|
||||
@{
|
||||
bool showInactivityTimer = (bool)(ViewBag.ShowInactivityTimer ?? true);
|
||||
string welcomeUrl = ViewBag.WelcomeUrl as string ?? "/Kiosk/Welcome";
|
||||
int inactivityMs = ViewBag.InactivityTimeoutMs as int? ?? (5 * 60 * 1000);
|
||||
}
|
||||
@if (showInactivityTimer)
|
||||
{
|
||||
<script>
|
||||
(function () {
|
||||
var TIMEOUT_MS = 5 * 60 * 1000;
|
||||
var TIMEOUT_MS = @inactivityMs;
|
||||
var timer;
|
||||
function reset() {
|
||||
clearTimeout(timer);
|
||||
|
||||
Reference in New Issue
Block a user