public static function motdepasseOublie($args, &$x)
{
- self::form('recupMotdepasse', 'Mot de passe oublié ?', commonUrl::motdepasseOublie($args), __('Réinitialiser mon mot de passe'));
+ self::form('recupMotdepasse', __('Mot de passe oublié ?'), commonUrl::motdepasseOublie($args), __('Réinitialiser mon mot de passe'));
}
public static function mesParametres($args, &$x)
{
- self::form('sauveMesParametres', 'Mes paramètres', commonUrl::mesParametres($args), false);
+ self::form('sauveMesParametres', __('Mes paramètres'), commonUrl::mesParametres($args), false);
}
public static function sauveMesParametres($args, &$x)
public static function resetPassword($args, &$x)
{
+ global $core;
+ $dao = new commonDAOUtilisateur($core->con);
+ $u = $dao->selectByEmail($_POST['email']);
+ if (!$u || !$u->reset_password || $u->reset_password != $_POST['reset_password']) {
+ $x->addContent('messagereset', __('Lien de réinitialisation invalide'));
+ return;
+ }
+ if (strlen($_POST['new_password']) < 8) {
+ $x->addContent('messagereset', __('Le mot de passe choisi doit comporter au moins 8 caractères'));
+ $x->addError('new_password');
+ $x->addError('confirm_password');
+ return;
+ }
+ if ($_POST['new_password'] != $_POST['confirm_password']) {
+ $x->addContent('messagereset', __('Le mot de passe et la confirmation ne correspondent pas'));
+ $x->addError('new_password');
+ $x->addError('confirm_password');
+ return;
+ }
+ $dao->changeMotdepasse($u->utilisateur_id, $_POST['new_password']);
+ $x->addAlert(__('Votre mot de passe a été réinitialisé.') . ' ' . __('Vous allez être redirigé vers la page de connexion'));
+ $x->addRedirection('/');
}
public static function recupMotdepasse($args, &$x)
public static function resetPassword($args)\r
{\r
global $core;\r
- $dao = new commonDAOUtilisateur($core->con);\r
- $u = $dao->selectByEmail($args[1]);\r
- if (!$u || $u->reset_password != $args[2]) {\r
- http::redirect('/');\r
- }\r
\r
$res = commonPage::barre();\r
$res .= commonPage::tMain();\r
$res .= '<table>';\r
$res .= '<tr><th colspan="2"><strong>' . __('Réinitialisation de votre mot de passe') . '</strong></th></tr>';\r
$res .= '<tr><td colspan="2">' . __('Veuillez choisir un mot de passe contenant au moins 8 caractères') . '</td></tr>';\r
- $res .= '<tr><td>' . __('Votre nouveau mot de passe') . ' : </td><td>' . form::password('new_password', 20, 64, '') . '</td></tr>';\r
- $res .= '<tr><td>' . __('Confirmation de votre nouveau mot de passe') . ' : </td><td>' . form::password('user_password', 20, 64, '') . '</td></tr>';\r
+ $res .= '<tr><td colspan="2"><div id="messagereset"></div></td></tr>';\r
+ $res .= '<tr><td>' . __('Votre nouveau mot de passe') . ' : </td><td>' . form::hidden('reset_password', $args[2]) . form::hidden('email', $args[1]) . form::password('new_password', 20, 64, '') . '</td></tr>';\r
+ $res .= '<tr><td>' . __('Confirmation de votre nouveau mot de passe') . ' : </td><td>' . form::password('confirm_password', 20, 64, '') . '</td></tr>';\r
$res .= '<tr><td colspan="2" class="right"><a href="#" class="submit">' . $core->typo->BoutonOK('Réinitialiser le mot de passe') . '</a></td></tr>';\r
$res .= '</table>';\r
$res .= '</form>';\r
input[type="text"], input[type="password"], input[type="email"], input[type="search"], textarea {
- font-family: Verdana;
- font-size: 12px;
- -webkit-appearance: textfield;
- outline: none;
+ font-family: Verdana;
+ font-size: 12px;
+ -webkit-appearance: textfield;
+ outline: none;
}
select {
- font-family: Verdana;
- font-size: 12px;
- outline: none;
+ font-family: Verdana;
+ font-size: 12px;
+ outline: none;
}
h1 {
- font-family: UniversCondensedBold;
- font-weight: normal;
- text-transform: uppercase;
- font-size: 16px;
- padding: 10px 0 5px;
+ font-family: UniversCondensedBold;
+ font-weight: normal;
+ text-transform: uppercase;
+ font-size: 16px;
+ padding: 10px 0 5px;
}
@font-face {
- font-family: 'UniversCondensedBold';
- src: url('univers-condensedbold-webfont.eot');
- src: url('univers-condensedbold-webfont.eot?#iefix') format('embedded-opentype'),
- url('univers-condensedbold-webfont.woff') format('woff'),
- url('univers-condensedbold-webfont.ttf') format('truetype'),
- url('univers-condensedbold-webfont.svg#UniversCondensedBold') format('svg');
- font-weight: normal;
- font-style: normal;
+ font-family: 'UniversCondensedBold';
+ src: url('univers-condensedbold-webfont.eot');
+ src: url('univers-condensedbold-webfont.eot?#iefix') format('embedded-opentype'),
+ url('univers-condensedbold-webfont.woff') format('woff'),
+ url('univers-condensedbold-webfont.ttf') format('truetype'),
+ url('univers-condensedbold-webfont.svg#UniversCondensedBold') format('svg');
+ font-weight: normal;
+ font-style: normal;
}
.b {
- padding: 3px;
- background: #ffffff;
- border-radius: 7px;
- -ms-box-shadow: 0px 0px 5px #999fab;
- -o-box-shadow: 0px 0px 5px #999fab;
- -moz-box-shadow: 0px 0px 5px #999fab;
- -webkit-box-shadow: 0px 0px 5px #999fab;
- box-shadow: 0px 0px 5px #999fab;
- margin-bottom: 10px;
+ padding: 3px;
+ background: #ffffff;
+ border-radius: 7px;
+ -ms-box-shadow: 0px 0px 5px #999fab;
+ -o-box-shadow: 0px 0px 5px #999fab;
+ -moz-box-shadow: 0px 0px 5px #999fab;
+ -webkit-box-shadow: 0px 0px 5px #999fab;
+ box-shadow: 0px 0px 5px #999fab;
+ margin-bottom: 10px;
}
.b table {
- width: 100%;
+ width: 100%;
}
/* Top left */
.b table tr:first-child th:first-child {
- border-radius: 6px 0 0 0;
+ border-radius: 6px 0 0 0;
}
.b table tr:first-child th:last-child {
- border-radius: 0 6px 0 0;
+ border-radius: 0 6px 0 0;
}
.b table tr:last-child td:first-child {
- border-radius: 0 0 0 6px;
+ border-radius: 0 0 0 6px;
}
.b table tr:last-child td:last-child {
- border-radius: 0 0 6px 0;
+ border-radius: 0 0 6px 0;
}
.b table.legende tr td,
.b table.legende tr th {
- border-radius: 0 !important;
+ border-radius: 0 !important;
}
.b.login {
- width: 450px;
- margin: 0 auto;
+ width: 450px;
+ margin: 0 auto;
}
.b.resetpassword {
- width: 600px;
- margin: 0 auto;
+ width: 600px;
+ margin: 0 auto;
+
+ #messagereset {
+ color: #c00;
+ font-weight: bold;
+ text-align: center;
+ }
}
.onglet {
- background: url('onglet.png');
- background-position: top left;
- background-repeat: repeat-x;
- text-align: center;
- border-radius: 7px 7px 0 0;
- color: #ffffff;
- font-size: 14px;
- width: 119px;
- text-transform: uppercase;
- font-family: UniversCondensedBold, Arial, Helvetica, sans-serif;
- display: inline-block;
- height: 24px;
- margin-right: 1px;
- text-decoration: none;
- padding: 7px 0 0 0;
- font-weight: normal;
+ background: url('onglet.png');
+ background-position: top left;
+ background-repeat: repeat-x;
+ text-align: center;
+ border-radius: 7px 7px 0 0;
+ color: #ffffff;
+ font-size: 14px;
+ width: 119px;
+ text-transform: uppercase;
+ font-family: UniversCondensedBold, Arial, Helvetica, sans-serif;
+ display: inline-block;
+ height: 24px;
+ margin-right: 1px;
+ text-decoration: none;
+ padding: 7px 0 0 0;
+ font-weight: normal;
}
.onglet.active, .onglet:hover {
- background-position: bottom left;
+ background-position: bottom left;
}
#ajaxLoader {
- position: fixed;
- display: none;
- top: 0px;
- left: 0px;
- width: 100%;
- height: 100%;
- z-index: 10000000;
+ position: fixed;
+ display: none;
+ top: 0px;
+ left: 0px;
+ width: 100%;
+ height: 100%;
+ z-index: 10000000;
}
#ajaxLoader .c {
- background: #fff;
- font-size: 16px;
- padding: 20px;
- width: 300px;
- height: 50px;
- margin: 0 auto;
- border-radius: 0 0 10px 10px;
- box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
- -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
- -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
- -ms-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
- -o-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
+ background: #fff;
+ font-size: 16px;
+ padding: 20px;
+ width: 300px;
+ height: 50px;
+ margin: 0 auto;
+ border-radius: 0 0 10px 10px;
+ box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
+ -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
+ -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
+ -ms-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
+ -o-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
}
#ajaxLoader .c img {
- vertical-align: middle;
- display: block;
- float: left;
+ vertical-align: middle;
+ display: block;
+ float: left;
}
#ajaxLoader .c p {
- width: 240px;
- float: left;
- margin-left: 20px;
- text-align: center;
+ width: 240px;
+ float: left;
+ margin-left: 20px;
+ text-align: center;
}
form#upload {
- width: 600px;
- margin: 0 auto;
- padding: 0 0 20px;
- input[type="file"] {
- position: absolute;
- top: 0;
- left: 0;
- opacity: 0;
- width: 1px;
- height: 1px;
- }
-
- a.button {
- height: 30px;
- box-sizing: border-box;
- color: #fff;
- font-weight: 700;
- background-color: #9cc10e;
- display: inline-block;
- padding: 7px 10px;
- text-decoration: none;
- border-radius: 5px;
- text-align: center;
- width: 120px;
- vertical-align: top;
- }
-
- .progress {
- border: 1px solid #ccc;
- border-radius: 5px;
-
- width: 430px;
- height: 30px;
- margin-right: 10px;
- display: inline-block;
- vertical-align: top;
- position: relative;
-
- .back {
- position: absolute;
- background-color: #fff;
- width: 100%;
- height: 30px;
- top: 0;
- left: 0;
- z-index: 1;
- }
-
- .bar {
- position: absolute;
- background-color: #1F222A;
- width: 0%;
- height: 30px;
- top: 0;
- left: 0;
- z-index: 2;
- }
-
- .status {
- position: absolute;
- width: 100%;
- text-align: center;
- color: #9cc10e;
- top: 7px;
- z-index: 3;
- }
- }
+ width: 600px;
+ margin: 0 auto;
+ padding: 0 0 20px;
+
+ input[type="file"] {
+ position: absolute;
+ top: 0;
+ left: 0;
+ opacity: 0;
+ width: 1px;
+ height: 1px;
+ }
+
+ a.button {
+ height: 30px;
+ box-sizing: border-box;
+ color: #fff;
+ font-weight: 700;
+ background-color: #9cc10e;
+ display: inline-block;
+ padding: 7px 10px;
+ text-decoration: none;
+ border-radius: 5px;
+ text-align: center;
+ width: 120px;
+ vertical-align: top;
+ }
+
+ .progress {
+ border: 1px solid #ccc;
+ border-radius: 5px;
+
+ width: 430px;
+ height: 30px;
+ margin-right: 10px;
+ display: inline-block;
+ vertical-align: top;
+ position: relative;
+
+ .back {
+ position: absolute;
+ background-color: #fff;
+ width: 100%;
+ height: 30px;
+ top: 0;
+ left: 0;
+ z-index: 1;
+ }
+
+ .bar {
+ position: absolute;
+ background-color: #1F222A;
+ width: 0%;
+ height: 30px;
+ top: 0;
+ left: 0;
+ z-index: 2;
+ }
+
+ .status {
+ position: absolute;
+ width: 100%;
+ text-align: center;
+ color: #9cc10e;
+ top: 7px;
+ z-index: 3;
+ }
+ }
}
\ No newline at end of file