修改错误提示方式
This commit is contained in:
parent
1822a361cf
commit
dd22a0fe70
|
@ -264,7 +264,7 @@ class AccountController extends Zend_Controller_Action
|
||||||
|
|
||||||
if(isset($status['error']))
|
if(isset($status['error']))
|
||||||
{
|
{
|
||||||
$this->view->error = $status['error'];
|
$this->view->error = view::Error($status['error']);
|
||||||
if(isset($status['place']))
|
if(isset($status['place']))
|
||||||
{
|
{
|
||||||
$this->view->place = $status['place'];
|
$this->view->place = $status['place'];
|
||||||
|
@ -317,7 +317,7 @@ class AccountController extends Zend_Controller_Action
|
||||||
|
|
||||||
if($captcha->isValid($captchaword) !== true)
|
if($captcha->isValid($captchaword) !== true)
|
||||||
{
|
{
|
||||||
$this->view->error = "验证码错误";
|
$this->view->error = view::Error("验证码错误");
|
||||||
$this->view->captcha = $captcha->setCaptcha();
|
$this->view->captcha = $captcha->setCaptcha();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -330,7 +330,7 @@ class AccountController extends Zend_Controller_Action
|
||||||
|
|
||||||
if(isset($status['error']))
|
if(isset($status['error']))
|
||||||
{
|
{
|
||||||
$this->view->error = $status;
|
$this->view->error = view::Error($status['error']);
|
||||||
$this->view->captcha = $captcha->setCaptcha();
|
$this->view->captcha = $captcha->setCaptcha();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,9 +13,7 @@
|
||||||
请输入用户名和密码登录
|
请输入用户名和密码登录
|
||||||
</div>
|
</div>
|
||||||
<? }else{ ?>
|
<? }else{ ?>
|
||||||
<div class="alert alert-error alert-login">
|
<?= $this->error ?>
|
||||||
<?= isset($this->error['error'])? $this->error['error'] : $this->error ?>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for="username">用户名</label>
|
<label class="control-label" for="username">用户名</label>
|
||||||
|
|
|
@ -14,9 +14,7 @@
|
||||||
请输入您的基本信息进行注册
|
请输入您的基本信息进行注册
|
||||||
</div>
|
</div>
|
||||||
<? }else{ ?>
|
<? }else{ ?>
|
||||||
<div class="alert alert-error alert-login">
|
<?= $this->error ?>
|
||||||
<?= isset($this->error['error'])? $this->error['error'] : $this->error ?>
|
|
||||||
</div>
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for="username">用户名</label>
|
<label class="control-label" for="username">用户名</label>
|
||||||
|
|
|
@ -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 = '<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";
|
$html.= '<a class="close" data-dismiss="alert" href="#">×</a>'."\r\n";
|
||||||
if(!is_array($content)) {
|
if(!is_array($content)) {
|
||||||
$html.= '<h4 class="alert-heading">'.$content.'</h4>'."\r\n";
|
$html.= ''.$content.''."\r\n";
|
||||||
}else{
|
}else{
|
||||||
$html.= '<ul>'."\r\n";
|
$html.= '<ul>'."\r\n";
|
||||||
foreach($content as $v) {
|
foreach($content as $v) {
|
||||||
|
|
|
@ -83,7 +83,7 @@ class RegisterOperate implements \Users\Event\RegisterEvent
|
||||||
|
|
||||||
if (!preg_match('/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/',$data['email']))
|
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']))
|
if(!empty($data['realname']))
|
||||||
|
|
Loading…
Reference in New Issue