Ceci est une ancienne révision du document !
cake3
La dernière version de cakePhp, cakePhp3
install notes
un truc super-bizarre, rien ne marche si on a la directive MultiViews dans apache
il faut changer:
vi root@radeff-ThinkPad-X200-Tablet:/etc/apache2/sites-enabled# vi 000-default.conf
<Directory /var/www/>
#Options Indexes FollowSymLinks MultiViews
Options Indexes FollowSymLinks
login page focus username
pour mettre le focus sur le champ du nom d'utilisateur au login
jquery
<script type="text/javascript">
$(function() {
$("#username").focus();
});
</script>
<?php
$this->set('title', "Login");
?>
<?= $this->Form->create() ?>
<?= $this->Form->input('username') ?>
<?= $this->Form->input('password') ?>
<?= $this->Form->button('Login') ?>
<?= $this->Form->end() ?>
html5
(navigateurs récents)
echo $this->Form->inputs(array( 'legend' => __(''), 'username' => array('autofocus'=>'autofocus'), 'password' ));
<form action="demo_form.asp"> First name: <input type="text" name="fname" autofocus><br> Last name: <input type="text" name="lname"><br> <input type="submit"> </form>