Remove form
This commit is contained in:
parent
f6a5ec5a77
commit
65e327c83d
@ -44,7 +44,6 @@
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form id="printTempPw" class="space-y-4 mt-12"></form>
|
||||
<div>
|
||||
<label for="password" class="block text-sm font-medium text-gray-700">Temp Password:</label>
|
||||
<input type="text" id="password" name="password" required
|
||||
@ -53,11 +52,11 @@
|
||||
|
||||
<div class="text-center">
|
||||
<button type="submit"
|
||||
id="printTempPw"
|
||||
class="w-full bg-gray-500 text-white py-2 px-4 rounded-md hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-opacity-50 mt-2">
|
||||
Print Temp Password
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
@ -109,12 +108,8 @@
|
||||
.catch(error => alert('Error: ' + error));
|
||||
});
|
||||
|
||||
document.getElementById('printTempPw').addEventListener('submit', (event) => {
|
||||
event.preventDefault(); // Prevent the form from submitting normally
|
||||
|
||||
// Get the form data
|
||||
const formData = new FormData(event.target);
|
||||
const password = formData.get('password');
|
||||
document.getElementById('printTempPw').addEventListener('click', (event) => {
|
||||
const password = document.getElementById('password').value;
|
||||
|
||||
// Send a POST request with the form data to the server
|
||||
fetch('/print-temp-pw', {
|
||||
|
Loading…
Reference in New Issue
Block a user