Updated by
Snippets
Sergio de EOM CakePHP 3.1 Login for custom (Model + Form + Bootstrap + Bootstrap for Spanish in Inflector)
Updated by
Added
usuarios.sql- Ignore whitespace
Updated by
Added
Usuario.php- Ignore whitespace
Added
UsuariosTable.php- Ignore whitespace
Added
bootstrap.php- Ignore whitespace
+ * Plugins need to be loaded manually, you can either load them one by one or all of them in a single call
+ * Uncomment one of the lines below, as you need. make sure you read the documentation on Plugin to use more
+ * This is needed for matching the auto-localized string output of Time() class when parsing dates.
Deleted
snippet.php- Ignore whitespace
Created by
Added
AppController.php- Ignore whitespace
+ 'fields' => ['username' => 'email', 'password' => 'password'], // @todo mis campos personalizados segun DB
+ 'scope' => ['Usuarios.habilitado' => 1] // @todo Filtro para bloquiar ingresos de usuarios activos segun DB
+ if (true === isset($usuario['perfiles_id']) && $usuario['perfiles_id'] === '1') { // @todo Codigo a cambiar segun DB y PROYECTO
+ $this->Auth->allow(['index', 'view', 'display', 'contactarnos', 'registrarce', 'logout']); // @todo Codigo a cambiar segun DB y PROYECTO
Added
UsuariosController.php- Ignore whitespace
Added
default- Ignore whitespace
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
+<p class="browserupgrade">Está utilizando un <strong> version obsoleta </strong> del navegador. Por favor, <a
+<script>window.jQuery || document.write('<script src="/js/vendor/jquery-1.11.2.min.js"><\/script>')</script>
Added
login.ctp.php- Ignore whitespace
+ <div id="loginbox" style="margin-top:50px;" class="mainbox col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
+ <div class="panel-title"><i class="glyphicon glyphicon-user"></i> Formulario de ingreso al sistema</div>
+ <form id="loginform" class="form-horizontal" role="form" method="post" action="<?php echo $this->Url->build(["controller" => "Usuarios", "action" => "login"]) ?>">
+ <input id="login-username" type="text" class="form-control" name="email" value="" placeholder="E-Mail">
+ <input id="login-password" type="password" class="form-control" name="password" placeholder="Clave">
+ <button type="submit" id="btn-login" class="btn btn-primary btn-block"><i class="glyphicon glyphicon-log-in"></i> ENTRAR</button>
Added
snippet.php- Ignore whitespace
You can clone a snippet to your computer for local editing. Learn more.