142 lines
4.4 KiB
HTML
142 lines
4.4 KiB
HTML
#CACHE{0}
|
|
<div class="formulaire_spip formulaire_#FORM">
|
|
|
|
[<p class="reponse_formulaire reponse_formulaire_erreur">(#ENV*{message_erreur})</p>]
|
|
[<p class="reponse_formulaire reponse_formulaire_ok">(#ENV*{message_ok})</p>]
|
|
|
|
<form name="formulaire_#FORM" id="editer_compte_spip" action="#ENV{action}" method="post"><div>
|
|
#ACTION_FORMULAIRE{#ENV{action}}
|
|
|
|
[(#ENV{id_auteur}|!={new}|oui)
|
|
<div class="comptespip_logo_auteur">
|
|
<INCLURE{fond=inclure/logo_auteur,id_auteur,env}>
|
|
|
|
[(#ENV{_bigup_rechercher_fichiers}|oui)
|
|
[(#SAISIE{bigup, logo, form, formulaire_args}
|
|
{previsualiser=oui}
|
|
{accept=image/*}
|
|
)]
|
|
]
|
|
</div>
|
|
]
|
|
|
|
|
|
<fieldset>
|
|
<legend><:comptespip:identite:></legend>
|
|
#GENERER_SAISIES{#ENV{_saisies}}
|
|
</fieldset>
|
|
|
|
<BOUCLE_con(CONDITION){si #PLUGIN{verifmob}|oui}>
|
|
<style type="text/css" media="screen">
|
|
.editer_telephone {
|
|
display: none
|
|
}
|
|
</style>
|
|
<fieldset>
|
|
<legend><:comptespip:telephone|ucfirst:></legend>
|
|
<div class="editer">
|
|
#SET{erreurs,#ENV**{erreurs}|table_valeur{mobile}}
|
|
[<span class="erreur_message">(#GET{erreurs})</span>]
|
|
<div class="verif_mobile editer">
|
|
<button class="badge" onclick="return false;">+</button>
|
|
<input class="text" type="text"
|
|
name="indicatif"
|
|
id="indicatif"
|
|
value="33"
|
|
pattern="[0-9]{2,4}"
|
|
required
|
|
>
|
|
<input type="tel" class="verif_mobile"
|
|
id="mobile"
|
|
name="mobile"
|
|
placeholder="611223344"
|
|
value="[(#ENV{mobile})]"
|
|
pattern="^[67][0-9]{8}$"
|
|
autocomplete="off"
|
|
required
|
|
maxlength="9"
|
|
>
|
|
<button class="btn--warning envoyer_sms mts mlm" type="button"><:gabo:envoyer_sms:></button>
|
|
</div>
|
|
</div>
|
|
<div class='editer saisie_confirmation obligatoire[ (#ENV*{erreurs}|table_valeur{confirmation}|oui)erreur]'>
|
|
<label for="confirmation"><:comptespip:code_confirmation_sms:> <em class="obligatoire"><:info_obligatoire_02:></em></label>
|
|
#SET{erreurs,#ENV**{erreurs}|table_valeur{confirmation_sms}}
|
|
[<span class="erreur_message">(#GET{erreurs})</span>]
|
|
<input type="text" class="text" id="confirmation_sms" name="confirmation_sms" value="#ENV{confirmation_sms}">
|
|
</div>
|
|
<button class="btn btn--warning renvoyer_sms" type="button"> <:comptespip:renvoyer_sms:> </button>
|
|
</fieldset>
|
|
[(#INCLURE{fond=inclure/verif_mobile})]
|
|
</BOUCLE_con>
|
|
|
|
<fieldset>
|
|
<legend><:comptespip:mot_de_passe:></legend>
|
|
<div class="editer_groupe">
|
|
<div style="height: 0;">
|
|
[(#SAISIE{input,new_password}
|
|
{type=hidden}
|
|
)]
|
|
[(#SAISIE{input,new_password_confirmation}
|
|
{type=hidden}
|
|
)]
|
|
</div>
|
|
|
|
[(#SET{min,#VAL{minlength=}|concat{#ENV{pass_longeur_mini,6}}})]
|
|
[(#SET{chaine_langue,#VAL{comptespip:champ_password}|_T{#ARRAY{min,#ENV{pass_longeur_mini}}}})]
|
|
[(#SAISIE{input,password}
|
|
{type=password}
|
|
{attributs=#GET{min}}
|
|
{label=#GET{chaine_langue}}
|
|
)]
|
|
[(#SAISIE{input,password_confirmation}
|
|
{type=password}
|
|
{label=<:comptespip:champ_password_confirm:>}
|
|
)]
|
|
</div>
|
|
</fieldset>
|
|
|
|
<div class="boutons">
|
|
[(#ENV{id_auteur}|!={new}|et{#AUTORISER{supprimer,comptespip}|oui}|et{#CONFIG{comptespip/interdire_suppression}|!={oui}|oui})
|
|
<a class="supprimer_compte_spip btn" href="[(#URL_PAGE{supprimer_compte_spip})]"><:comptespip:btn_supprimer_compte_spip:></a>
|
|
]
|
|
<button type="submit" class="btn"><:comptespip:valider:></button>
|
|
</div>
|
|
</div></form>
|
|
|
|
</div>
|
|
|
|
<script type="text/javascript" src="[(#CHEMIN{prive/javascript/login-sha-min.js})]"></script>
|
|
<script type="text/javascript">
|
|
|
|
|
|
jQuery(function(){
|
|
$('#champ_password').on('keyup', function(){
|
|
$('#champ_password_confirmation').val('');
|
|
});
|
|
jQuery('form#editer_compte_spip').on('submit', function(e){
|
|
//var alea = "#ENV{alea}";
|
|
['#champ_password', "#champ_password_confirmation"].forEach((champ)=>{
|
|
var pass = $(champ).val();
|
|
$(champ).val('');
|
|
|
|
if (pass
|
|
&& !pass.match(/^\{([0-9a-f]{32});([0-9a-f]{32})\}$/i)
|
|
&& !pass.match(/^\{([0-9a-f]{64});([0-9a-f]{64});([0-9a-f]{32});([0-9a-f]{32})\}$/i)
|
|
&& sha256_self_test() // verifions que le hash sha est operationnel
|
|
) {
|
|
//var hash = hex_sha256(alea + pass);
|
|
var hash = hex_sha256(pass);
|
|
if ( hash ) {
|
|
if (champ === "#champ_password") {
|
|
$('input#champ_new_password').val(hash);
|
|
} else {
|
|
$('input#champ_new_password_confirmation').val(hash);
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
|
|
</script>
|