Revue JS frontend formulaire inscription : pas de redirection mais info si déjà connecté
This commit is contained in:
parent
cf9bfa559e
commit
a078795178
@ -14,7 +14,7 @@ const configUsers = require("../../config/users");// idem pour configurer formul
|
||||
// Importation des fonctions utiles au script :
|
||||
import { getLocaly, removeLocaly, saveLocaly } from "./tools/clientstorage.js";
|
||||
import { addElement } from "./tools/dom.js";
|
||||
import { helloDev } from "./tools/everywhere.js";
|
||||
import { helloDev, updateAccountLink } from "./tools/everywhere.js";
|
||||
import { getDatasFromInputs, setAttributesToInputs } from "./tools/forms.js";
|
||||
import { loadMatomo } from "./tools/matomo.js";
|
||||
import { checkAnswerDatas, checkSession, getTimeDifference } from "./tools/users.js";
|
||||
@ -37,10 +37,11 @@ const initialise = async () =>
|
||||
const isConnected=await checkSession();
|
||||
if(isConnected)
|
||||
{
|
||||
saveLocaly("message", { message: alreadyConnected, color:"info" });
|
||||
// on change le lien d'accès au compte
|
||||
const user=getLocaly("user", true);
|
||||
const homePage=user.status+"HomePage";
|
||||
window.location.assign("/"+configTemplate[homePage]);
|
||||
updateAccountLink(user.status, configTemplate);
|
||||
myForm.style.display="block";
|
||||
myForm.innerHTML="<p class='info'>"+alreadyConnected+"</p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user