diff --git a/src/components/Abonnement.js b/src/components/Abonnement.js index b952945..a557217 100644 --- a/src/components/Abonnement.js +++ b/src/components/Abonnement.js @@ -981,7 +981,10 @@ function Abonnement(props) {
Nombre de formations : {String(parnternbformation)}   - {result && !(JSON.parse(result).end_date_abonnement) && !changepartnb_ftion && + {result && !(JSON.parse(result).end_date_abonnement) && !changepartnb_ftion + && currentpack2 + && String(currentpack2).toLowerCase() !=="decouverte" + && }
diff --git a/src/components/PartnerSignInFirst.js b/src/components/PartnerSignInFirst.js index c926036..a0a0df8 100644 --- a/src/components/PartnerSignInFirst.js +++ b/src/components/PartnerSignInFirst.js @@ -113,7 +113,6 @@ function PartnerSignIn() { formData.append("email", mymail); formData.append("pwd", mypwd); - fetch( url_login, { @@ -212,7 +211,7 @@ function PartnerSignIn() {
-
+

@@ -227,7 +226,7 @@ function PartnerSignIn() {
-
+ {/*

@@ -248,7 +247,7 @@ function PartnerSignIn() {
-
+
*/} {isconnected === "false" &&

Erreur Connexion
diff --git a/src/components/PartnerSignInSecond.js b/src/components/PartnerSignInSecond.js index 1892578..21d0c7a 100644 --- a/src/components/PartnerSignInSecond.js +++ b/src/components/PartnerSignInSecond.js @@ -14,11 +14,14 @@ import MenuItem from "@material-ui/core/MenuItem"; import Menu from "@material-ui/core/Menu"; import Header from "./Header"; +import Visibility from '@mui/icons-material/Visibility'; +import VisibilityOff from '@mui/icons-material/VisibilityOff'; function PartnerSignIn() { const [isconnected, setisconnected] = useState(""); const [cookie, setCookie, removeCookie] = useCookies(['tokenmysych']); const [cookie_part, setCookie_part, removeCookie_part] = useCookies(['tokenmysypart']); + const [currentpawdvisible, setcurrentpawdvisible] = useState(false); const url_login = process.env.REACT_APP_API_URL + "myclass/api/partner_login/"; @@ -112,7 +115,7 @@ function PartnerSignIn() { formData.append("email", mymail); formData.append("pwd", mypwd); - + fetch( url_login, @@ -198,6 +201,17 @@ function PartnerSignIn() { history.push("/PartnerLogin") }; + const handleClickShowPassword = () => { + if (currentpawdvisible == false) { + document.getElementsByName("pwd_partner")[0].type = "text"; + setcurrentpawdvisible(true); + } + else if (currentpawdvisible == true) { + document.getElementsByName("pwd_partner")[0].type = "password"; + setcurrentpawdvisible(false); + } + }; + return (
@@ -220,8 +234,8 @@ function PartnerSignIn() {
    -
  • Etape 1 : Un courriel d'activation vous a été envoyé par email. Activez votre compte à partir de ce courriel.
  • -
  • >> Etape 2 : Récuperez votre clé secréte envoyée dans un second email. Elle est unique et est nécessaire pour administrer votre compte +
  • Etape 1 : Un courriel d'activation vous a été envoyé par email. Activez votre compte à partir de ce courriel.
  • +
  • >> Etape 2 : Récuperez votre clé secréte envoyée dans un second email. Elle est unique et est nécessaire pour administrer votre compte ( Et pensez à regarder vos mails indésirables/vos spams !). <<
     
@@ -239,7 +253,17 @@ function PartnerSignIn() { - +
+
+ +
+
+ {currentpawdvisible ? : } +
+ +
+ +
diff --git a/src/components/SignIn.js b/src/components/SignIn.js index 2b7b88a..bda1268 100644 --- a/src/components/SignIn.js +++ b/src/components/SignIn.js @@ -20,6 +20,8 @@ import Button2 from "@material-ui/core/Button"; import Menu from "@material-ui/core/Menu"; import Header from "./Header"; import { useLocation } from "react-router-dom"; +import Visibility from '@mui/icons-material/Visibility'; +import VisibilityOff from '@mui/icons-material/VisibilityOff'; function SignIn() { const [isconnected, setisconnected] = useState(""); @@ -38,6 +40,7 @@ function SignIn() { const [closepopup, setclosepopup] = useState(0); const { obj, objid } = useParams(); const [menucompte, setmenucompte] = useState("partner"); + const [currentpawdvisible, setcurrentpawdvisible] = useState(false); const { register, @@ -101,17 +104,17 @@ function SignIn() { var partner_connexion = ""; var url_login = ""; - if (String(menucompte) === "partner" ) { + if (String(menucompte) === "partner") { url_login = process.env.REACT_APP_API_URL + "myclass/api/partner_login/"; setmenucompte("partner"); partner_connexion = "partner"; - + } - else if (String(menucompte) === "user" ) { + else if (String(menucompte) === "user") { url_login = process.env.REACT_APP_API_URL + "myclass/api/login/"; setmenucompte("user"); partner_connexion = "user"; - + } // Gestion des Cookies @@ -151,7 +154,7 @@ function SignIn() { } - + fetch( url_login, @@ -203,7 +206,7 @@ function SignIn() { useEffect(() => { setmenucompte("partner"); - + const listener = event => { if (event.code === "Enter" || event.code === "NumpadEnter") { @@ -414,6 +417,18 @@ function SignIn() { alert(" la valeur secrete = "+realpwdvalue); }*/ + + const handleClickShowPassword = () => { + if (currentpawdvisible == false) { + document.getElementsByName("pwd")[0].type = "text"; + setcurrentpawdvisible(true); + } + else if (currentpawdvisible == true) { + document.getElementsByName("pwd")[0].type = "password"; + setcurrentpawdvisible(false); + } + }; + return (
@@ -436,11 +451,11 @@ function SignIn() {
+ style={{ "float": "left", "textAlign": "center", "height": "3rem" }}>Utilisateur + style={{ "float": "right", "textAlign": "center", "height": "3rem" }}>Organisme de formation
@@ -457,13 +472,21 @@ function SignIn() {   - + - +
+
+ +
+
+ {currentpawdvisible ? : } +
+ +
- + {/*String(menucompte) === String("partner") && @@ -540,8 +563,8 @@ function SignIn() {
-   - +   +
diff --git a/src/components/UpdatePartnerInfo.js b/src/components/UpdatePartnerInfo.js index 09d5b75..144d0ef 100644 --- a/src/components/UpdatePartnerInfo.js +++ b/src/components/UpdatePartnerInfo.js @@ -57,7 +57,7 @@ function UpdateParnterInfo() { - const [currentpawdvisible, setcurrentpawdvisible] = useState(false); + const [currentpawdvisible, setcurrentpawdvisible] = useState(false); const [newpawdvisible, setnewpawdvisible] = useState(false); const [confpwdvisible, setconfpwdvisible] = useState(false); const [updatemainmail, setupdatemainmail] = useState(); diff --git a/src/styles/components/_partnersignin.scss b/src/styles/components/_partnersignin.scss index 73640bd..0e7aac6 100644 --- a/src/styles/components/_partnersignin.scss +++ b/src/styles/components/_partnersignin.scss @@ -223,6 +223,24 @@ font-family: "verdana", "Quicksand", "Signika", "sans-serif"; font-size: 0.8rem; } + + .label_pwd_div { + width: 100%; + } + + .label_div { + width: 50%; + float: left; + } + + + .show_pwd_div { + width: 50%; + float: right; + padding-right: 10px; + text-align: right; + + } } @media only screen and (min-width: 601px) and (max-width: 991px) { @@ -593,6 +611,24 @@ font-family: "verdana", "Quicksand", "Signika", "sans-serif"; font-size: 0.8rem; } + + .label_pwd_div { + width: 100%; + } + + .label_div { + width: 50%; + float: left; + } + + + .show_pwd_div { + width: 50%; + float: right; + padding-right: 10px; + text-align: right; + + } } @media only screen and (min-width: 992px) and (max-width: 1199px) { @@ -979,6 +1015,24 @@ font-family: "verdana", "Quicksand", "Signika", "sans-serif"; font-size: 0.8rem; } + + .label_pwd_div { + width: 100%; + } + + .label_div { + width: 50%; + float: left; + } + + + .show_pwd_div { + width: 50%; + float: right; + padding-right: 10px; + text-align: right; + + } } @@ -1351,5 +1405,23 @@ font-family: "verdana", "Quicksand", "Signika", "sans-serif"; font-size: 0.8rem; } + + .label_pwd_div { + width: 100%; + } + + .label_div { + width: 50%; + float: left; + } + + + .show_pwd_div { + width: 50%; + float: right; + padding-right: 10px; + text-align: right; + + } } } diff --git a/src/styles/components/_partnersigninfirst.scss b/src/styles/components/_partnersigninfirst.scss index 8df387c..8995542 100644 --- a/src/styles/components/_partnersigninfirst.scss +++ b/src/styles/components/_partnersigninfirst.scss @@ -18,12 +18,11 @@ border-radius: 1rem; } - .div_gauche { - float: left; + .div_gauche_local { margin: auto; border: 1px solid red; border-width: 0.01rem; - width: 40%; + width: 80%; height: auto; padding: 10px; border-radius: 1rem; @@ -31,8 +30,28 @@ color: black; font-size: medium; font-family: "Signika", sans-serif; - margin-left: 3rem; background: white; + margin-left: auto; + margin-right: auto; + } + + .div_gauche { + margin: auto; + border: 1px solid black; + border-width: 0.01rem; + width: 50%; + height: 20rem; + padding: 10px; + border-radius: 1rem; + text-align: left; + //color: black; + //font-size: medium; + //font-family: "Signika", sans-serif; + margin-left: auto; + margin-right: auto; + background-color: #104277; + color: white; + margin-left: 3rem; } .div_droite { @@ -41,7 +60,7 @@ border: 1px solid red; border-width: 0.01rem; width: 40%; - height: auto; + height: 20rem; padding: 10px; border-radius: 1rem; text-align: left; diff --git a/src/styles/components/_signin.scss b/src/styles/components/_signin.scss index 8074f86..cee9b69 100644 --- a/src/styles/components/_signin.scss +++ b/src/styles/components/_signin.scss @@ -594,6 +594,26 @@ margin: 0.4rem !important; height: 1.8rem !important; } + + .label_pwd_div { + width: 100%; + } + + .label_div { + width: 50%; + float: left; + } + + + .show_pwd_div { + width: 50%; + float: right; + padding-right: 10px; + text-align: right; + + } + + } @media only screen and (min-width: 601px) and (max-width: 991px) { @@ -1147,6 +1167,24 @@ margin: 0.4rem !important; height: 1.8rem !important; } + .label_pwd_div { + width: 100%; + } + + .label_div { + width: 50%; + float: left; + } + + + .show_pwd_div { + width: 50%; + float: right; + padding-right: 10px; + text-align: right; + + } + } @media only screen and (min-width: 992px) and (max-width: 1199px) { @@ -1681,6 +1719,26 @@ margin: 0.4rem !important; height: 1.8rem !important; } + + .label_pwd_div { + width: 100%; + } + + .label_div { + width: 70%; + float: left; + } + + + .show_pwd_div { + width: 30%; + float: right; + padding-right: 10px; + text-align: right; + + } + + } @media only screen and (min-width: 1200px) { @@ -2239,8 +2297,24 @@ margin-top: 2rem; } + .label_pwd_div { + width: 100%; + } + + .label_div { + width: 50%; + float: left; + } + + + .show_pwd_div { + width: 50%; + float: right; + padding-right: 10px; + text-align: right; + + } - } // end media