From 51a505b4c64fbd1a5d77a5532cc2d33f7019fc7d Mon Sep 17 00:00:00 2001 From: david Date: Thu, 4 Oct 2012 15:57:42 +0000 Subject: [PATCH] =?UTF-8?q?Tarea=20#1125=20->=20Quitar=20la=20m=C3=A1scara?= =?UTF-8?q?=20en=20el=20campo=20'tel=C3=A9fono'=20del=20usuario?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_PROFIND_Web/trunk@56 3fe1ab16-cfe0-e34b-8c9f-7d8c168d430d --- www/protected/models/Usuario.php | 5 ++++- www/themes/profind/views/usuario/_form.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/www/protected/models/Usuario.php b/www/protected/models/Usuario.php index 3119a65..5ca9c3e 100644 --- a/www/protected/models/Usuario.php +++ b/www/protected/models/Usuario.php @@ -67,7 +67,7 @@ class Usuario extends CActiveRecord { // will receive user inputs. return array( array('email, password', 'required'), - array('email, nombre, apellidos, password, tipo, titulo, localidad, telefono', 'length', 'max' => 255), + array('email, nombre, apellidos, password, tipo, titulo, localidad', 'length', 'max' => 255), array('estado', 'length', 'max' => 1), @@ -76,6 +76,9 @@ class Usuario extends CActiveRecord { array('descripcion', 'safe'), + array('telefono', 'length', 'max' => 13), + array('telefono', 'match', 'pattern'=>'/^([+]?[0-9 ]+)$/'), + array('tipo', 'default', 'value' => self::TIPO_USUARIO_COORDINADOR), array('ficheroFotografia', 'file', diff --git a/www/themes/profind/views/usuario/_form.php b/www/themes/profind/views/usuario/_form.php index 7d2ee10..422606d 100644 --- a/www/themes/profind/views/usuario/_form.php +++ b/www/themes/profind/views/usuario/_form.php @@ -92,7 +92,7 @@ Yii::app()->clientScript->registerScript(
labelEx($model, 'telefono', array('class' => 'control-label')); ?>
- textField($model, 'telefono', array('class' => 'input-xlarge', 'data-mask' => '99-999-99-99')); ?> + textField($model, 'telefono', array('class' => 'input-xlarge')); ?>