feat: reset all fields on refresh

This commit is contained in:
Anton Livaja 2024-10-08 11:04:24 -04:00
parent 082d7effaf
commit 31322964b3
Signed by: anton
GPG Key ID: 44A86CFF1FDF0E85
1 changed files with 9 additions and 2 deletions

View File

@ -15,7 +15,7 @@
in mind in order to accommodate different use-cases and threat models.
</p>
<div id="wizard-container">
<form id="wizard-container">
<section>
<h2>Time Based Rules</h2>
<p>
@ -165,11 +165,18 @@
</section>
<button onclick="generatePolicy()">Generate Policy</button>
</div>
</form>
<textarea id="policy" disabled placeholder="Click 'Generate Policy'"></textarea>
<script>
function resetFormFields() {
const form = document.getElementById('wizard-container');
form.reset();
}
window.onload = resetFormFields;
function extractValues() {
const policy = {}