修改错误提示方式

This commit is contained in:
Li Jianxuan 2013-12-27 05:54:27 +00:00
parent 1822a361cf
commit dd22a0fe70
5 changed files with 7 additions and 11 deletions

View File

@ -264,7 +264,7 @@ class AccountController extends Zend_Controller_Action
if(isset($status['error']))
{
$this->view->error = $status['error'];
$this->view->error = view::Error($status['error']);
if(isset($status['place']))
{
$this->view->place = $status['place'];
@ -317,7 +317,7 @@ class AccountController extends Zend_Controller_Action
if($captcha->isValid($captchaword) !== true)
{
$this->view->error = "验证码错误";
$this->view->error = view::Error("验证码错误");
$this->view->captcha = $captcha->setCaptcha();
return true;
}
@ -330,7 +330,7 @@ class AccountController extends Zend_Controller_Action
if(isset($status['error']))
{
$this->view->error = $status;
$this->view->error = view::Error($status['error']);
$this->view->captcha = $captcha->setCaptcha();
return true;
}

View File

@ -13,9 +13,7 @@
请输入用户名和密码登录
</div>
<? }else{ ?>
<div class="alert alert-error alert-login">
<?= isset($this->error['error'])? $this->error['error'] : $this->error ?>
</div>
<?= $this->error ?>
<?php } ?>
<div class="control-group">
<label class="control-label" for="username">用户名</label>

View File

@ -14,9 +14,7 @@
请输入您的基本信息进行注册
</div>
<? }else{ ?>
<div class="alert alert-error alert-login">
<?= isset($this->error['error'])? $this->error['error'] : $this->error ?>
</div>
<?= $this->error ?>
<?php } ?>
<div class="control-group">
<label class="control-label" for="username">用户名</label>

View File

@ -55,7 +55,7 @@ class View extends \Zend_Controller_Plugin_Abstract
$html = '<div class="alert alert-block fade in '.$AlertType.'" id="Alert-error-box">'."\r\n";
$html.= '<a class="close" data-dismiss="alert" href="#">×</a>'."\r\n";
if(!is_array($content)) {
$html.= '<h4 class="alert-heading">'.$content.'</h4>'."\r\n";
$html.= ''.$content.''."\r\n";
}else{
$html.= '<ul>'."\r\n";
foreach($content as $v) {

View File

@ -83,7 +83,7 @@ class RegisterOperate implements \Users\Event\RegisterEvent
if (!preg_match('/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/',$data['email']))
{
return array('error'=>"请输入正确的电子邮件推荐使用QQ邮箱和Gmail邮箱",'place'=>'email');
return array('error'=>"请输入正确的电子邮件地址",'place'=>'email');
}
if(!empty($data['realname']))