Community « Le forum « Besoin d'aide « L'emplacement du formulaire d'authentification «
Comment: L'emplacement du formulaire d'authentification
Lasares: le rendu du code
[login] est traité par
Skin::build_block(), par défaut implémenté dans
skins/skin_skeleton.php.
Dépliez la boîte suivante pour avoir une idée :
$content = '<form method="post" action="'.$context['url_to_root'].'users/login.php" id="main_form"><p>'."\n";
// the id or email field
$content .= i18n::s('User').BR.'<input type="text" name="login_name" value="'.encode_field($text).'" size="10" maxlength="255" />'."\n".BR;
// the password
$content .= i18n::s('Password').BR.'<input type="password" name="login_password" size="10" maxlength="255" />'."\n".BR;
// the button
$content .= '<input type="submit" value="'.i18n::s('Login').' »" />';
// a place holder for time offset
$content .= '<input type="hidden" name="gmt_offset" id="gmt_offset" value="0" />';
// end of the form
$content .= '</p></form>';
// the script used to get the gmt offset from workstation run-time
$content .= '<script type="text/javascript">'."\n"
.'<!--'."\n"
.'now = new Date();'."\n"
.'offset = (-now.getTimezoneOffset() /60);'."\n"
.'document.getElementById(\'gmt_offset\').value = offset;'."\n"
.'// -->'."\n"
.'</script>'."\n";
by Bernard on Jan. 15 2007