forked from projects/fipamo
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.
This commit is contained in:
parent
61ae73a9e5
commit
ec1dc49ba1
4 changed files with 2 additions and 7 deletions
|
@ -225,9 +225,6 @@ class APIControl
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
var_dump($result);
|
|
||||||
|
|
||||||
$response->getBody()->write(json_encode($result));
|
$response->getBody()->write(json_encode($result));
|
||||||
return $response->withHeader('Content-Type', 'application/json');
|
return $response->withHeader('Content-Type', 'application/json');
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
<div>
|
<div>
|
||||||
<img id="the-logo" src="/assets/images/global/fipamo-logo.svg"/>
|
<img id="the-logo" src="/assets/images/global/fipamo-logo.svg"/>
|
||||||
</div>
|
</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="text" name="handle" class="form-control" placeholder="Handle" required/>
|
||||||
<input type="password" name="password" class="form-control" placeholder="Password" 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
|
ID, PLEASE
|
||||||
</button>
|
</button>
|
||||||
<a href="/dashboard/reset-password">?</a>
|
<a href="/dashboard/reset-password">?</a>
|
||||||
|
|
|
@ -557,7 +557,6 @@ class Base {
|
||||||
let self = this;
|
let self = this;
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let authForm = data.formDataToJSON(document.getElementById("login"));
|
let authForm = data.formDataToJSON(document.getElementById("login"));
|
||||||
console.log("authform");
|
|
||||||
notify.alert("Looking, hold up", null);
|
notify.alert("Looking, hold up", null);
|
||||||
let api = new (0, _fipamoAdminAPIDefault.default)();
|
let api = new (0, _fipamoAdminAPIDefault.default)();
|
||||||
this.processing = true;
|
this.processing = true;
|
||||||
|
|
|
@ -57,7 +57,6 @@ export default class Base {
|
||||||
let self = this;
|
let self = this;
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let authForm = data.formDataToJSON(document.getElementById('login'));
|
let authForm = data.formDataToJSON(document.getElementById('login'));
|
||||||
console.log('authform');
|
|
||||||
notify.alert('Looking, hold up', null);
|
notify.alert('Looking, hold up', null);
|
||||||
let api = new FipamoAdminAPI();
|
let api = new FipamoAdminAPI();
|
||||||
this.processing = true;
|
this.processing = true;
|
||||||
|
|
Loading…
Reference in a new issue