Login Hotfix

The script that handles logggin in and the form for getting that
information were both posting the info which would result in an
intemittent uncaught error.

An attribute was added to the form so it does not submit at the same
time the JS sends a request.

A minor bug but it was annoying.
pull/84/head
Ro 2 years ago
parent 61ae73a9e5
commit ec1dc49ba1
No known key found for this signature in database
GPG Key ID: 10C182AC6984D373

@ -225,9 +225,6 @@ class APIControl
];
break;
}
var_dump($result);
$response->getBody()->write(json_encode($result));
return $response->withHeader('Content-Type', 'application/json');
}

@ -2,10 +2,10 @@
<div>
<img id="the-logo" src="/assets/images/global/fipamo-logo.svg"/>
</div>
<form id="login" class='login' name="login" method="POST">
<form id="login" class='login' name="login" method="POST" onsubmit="return false;">
<input type="text" name="handle" class="form-control" placeholder="Handle" required/>
<input type="password" name="password" class="form-control" placeholder="Password" required/>
<button id="login-btn" class='login-btn' type='submit'>
<button id="login-btn" class='login-btn'>
ID, PLEASE
</button>
<a href="/dashboard/reset-password">?</a>

@ -557,7 +557,6 @@ class Base {
let self = this;
e.preventDefault();
let authForm = data.formDataToJSON(document.getElementById("login"));
console.log("authform");
notify.alert("Looking, hold up", null);
let api = new (0, _fipamoAdminAPIDefault.default)();
this.processing = true;

@ -57,7 +57,6 @@ export default class Base {
let self = this;
e.preventDefault();
let authForm = data.formDataToJSON(document.getElementById('login'));
console.log('authform');
notify.alert('Looking, hold up', null);
let api = new FipamoAdminAPI();
this.processing = true;

Loading…
Cancel
Save