From 4a48468729f613ebb46ba094ec95e111cd0c5040 Mon Sep 17 00:00:00 2001 From: Rajesh K Ilango Date: Fri, 26 Jul 2019 19:06:52 -0700 Subject: [PATCH] Change to fill form values from URL parameters. This is useful when there is login failure and the form is either empty or with values from previous attempt. --- webssh/static/js/main.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/webssh/static/js/main.js b/webssh/static/js/main.js index 0545ff2..81633b8 100644 --- a/webssh/static/js/main.js +++ b/webssh/static/js/main.js @@ -662,6 +662,14 @@ jQuery(function($){ data._origin = event_origin; } + for (var datum in data) { + var value = data[datum]; + if (value){ + window.localStorage.setItem(datum, value); + } + } + restore_items(fields); + $.ajax({ url: url, type: 'post',