From d2fe770463bf4fe61efbc7c59e9888f99ba77c25 Mon Sep 17 00:00:00 2001 From: Gregory Soutade Date: Sun, 16 Aug 2020 15:29:56 +0200 Subject: [PATCH] Add clear form button for "Add new password" div --- server/index.php | 1 + server/resources/gpass.js | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/server/index.php b/server/index.php index 4e215cf..040b77b 100644 --- a/server/index.php +++ b/server/index.php @@ -167,6 +167,7 @@ if ($user != "") echo ""; echo "
"; echo '
Master key strength
0%
 
'; + echo ""; } ?> diff --git a/server/resources/gpass.js b/server/resources/gpass.js index 6106ef7..db2f42f 100755 --- a/server/resources/gpass.js +++ b/server/resources/gpass.js @@ -109,6 +109,21 @@ function generate_simple_password() document.getElementById("new_password").value = _generate_random(8, symbols); } +function clear_form() +{ + div = document.getElementById("add_new_password"); + + inputs = div.getElementsByTagName("input"); + + for(i=0; i