Commits

Oscar Javier Moreno Rey committed c9e2e28

Rearrange some items in login page

  • Participants
  • Parent commits 96521a4

Comments (0)

Files changed (5)

 {
 	margin: 10px;
 }
+
+#login {
+    padding: 0px 0px 0px 170px;
+}

protected/models/LoginForm.php

 	{
 		return array(
 			'rememberMe'=>'Remember me next time',
+			'username'=>'Usuario',
+			'password'=>'Contraseña',
 		);
 	}
 
 					Yii::app()->user->login($identity,$duration);
 					break;
 				case UserIdentity::ERROR_USERNAME_INVALID:
-					$this->addError('username','Username is incorrect.');
+					$this->addError('username','Wrong username or password.');
 					break;
 				default: // UserIdentity::ERROR_PASSWORD_INVALID
-					$this->addError('password','Password is incorrect.');
+					$this->addError('password','Wrong username or password.');
 					break;
 			}
 		}

protected/views/incidencia/admin.php

                 <th><?php echo $sort->link('fecha_ingreso'); ?></th>
                 <th><?php echo $sort->link('cliente_id'); ?></th>
                 <th><?php echo $sort->link('equipo_id'); ?></th>
-                <th><?php echo $sort->link('falla'); ?></th>
-                <th><?php echo $sort->link('fecha_venta'); ?></th>
                 <th><?php echo $sort->link('estado'); ?></th>
                 <th>Actions</th>
               </tr>
                                     $model->equipo->tipo,
                                     $model->equipo->modelo
                                 ))); ?></td>
-                <td><?php echo CHtml::encode($model->falla); ?></td>
-                <td><?php echo CHtml::encode($model->fecha_venta); ?></td>
                 <td><?php echo CHtml::encode($model->estado === '0' ? 'Abierta' : 'Cerrada'); ?></td>
                 <td>
                   <?php echo CHtml::linkButton('Eliminar',array(

protected/views/layouts/main.php

     <div id="menu">
     <?php $this->widget('application.components.MainMenu',array(
         'items'=>array(
-            array('label'=>'Incidencias', 'url'=>array('/site/index')),
+            array('label'=>'Incidencias', 'url'=>array('/site/index'), 'visible'=>!Yii::app()->user->isGuest),
             array('label'=>'Equipos', 'url'=>array('equipo/'), 'visible'=> !Yii::app()->user->isGuest and Yii::app()->user->role == 1),
             array('label'=>'Clientes', 'url'=>array('cliente/'), 'visible'=> !Yii::app()->user->isGuest and Yii::app()->user->role == 1),
             array('label'=>'Usuarios', 'url'=>array('usuario/'), 'visible'=> !Yii::app()->user->isGuest and Yii::app()->user->role == 1),

protected/views/site/login.php

 <?php $this->pageTitle=Yii::app()->name . ' - Login'; ?>
 
-<h1>Login</h1>
+<div id="login">
+    <div class="yiiForm">
+        <p>
+            Bienvenido a la plataforma de soporte técnico.<br />
+            Por favor, ingrese su nombre de usuario y contraseña para comenzar.
+        </p>
+        <?php echo CHtml::beginForm(); ?>
 
-<div class="yiiForm">
-<?php echo CHtml::beginForm(); ?>
+        <?php echo CHtml::errorSummary($form); ?>
 
-<?php echo CHtml::errorSummary($form); ?>
+        <div class="simple">
+            <?php echo CHtml::activeLabel($form,'username'); ?>
+            <?php echo CHtml::activeTextField($form,'username') ?>
+        </div>
 
-<div class="simple">
-<?php echo CHtml::activeLabel($form,'username'); ?>
-<?php echo CHtml::activeTextField($form,'username') ?>
-</div>
+        <div class="simple">
+            <?php echo CHtml::activeLabel($form,'password'); ?>
+            <?php echo CHtml::activePasswordField($form,'password') ?>
+        </div>
 
-<div class="simple">
-<?php echo CHtml::activeLabel($form,'password'); ?>
-<?php echo CHtml::activePasswordField($form,'password') ?>
-<p class="hint">
-Hint: You may login with <tt>demo/demo</tt> or <tt>admin/admin</tt>.
-</p>
-</div>
+        <div class="action">
+            <?php echo CHtml::submitButton('Login'); ?>
+        </div>
 
-<div class="action">
-<?php echo CHtml::activeCheckBox($form,'rememberMe'); ?>
-<?php echo CHtml::activeLabel($form,'rememberMe'); ?>
-<br/>
-<?php echo CHtml::submitButton('Login'); ?>
-</div>
+        <?php echo CHtml::endForm(); ?>
 
-<?php echo CHtml::endForm(); ?>
-
-</div><!-- yiiForm -->
+    </div><!-- yiiForm -->
+</div><!-- end login -->