info:cake:cakephp3:homepage

Ceci est une ancienne révision du document !


cake3

La dernière version de cakePhp, cakePhp3

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

pour mettre le focus sur le champ du nom d'utilisateur au login

<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() ?>

(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>
  • info/cake/cakephp3/homepage.1464208632.txt.gz
  • Dernière modification : 2016/05/25 22:37
  • de radeff