当前位置: 首页>>代码示例>>PHP>>正文


PHP TbHtml::errorSummary方法代码示例

本文整理汇总了PHP中TbHtml::errorSummary方法的典型用法代码示例。如果您正苦于以下问题:PHP TbHtml::errorSummary方法的具体用法?PHP TbHtml::errorSummary怎么用?PHP TbHtml::errorSummary使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TbHtml的用法示例。


在下文中一共展示了TbHtml::errorSummary方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

    <title>Installation</title>

    <link rel="stylesheet" type="text/css" href="<?php 
echo Bootstrap::getBooster()->getAssetsUrl();
?>
/bootstrap/css/bootstrap.min.css" />
</head>
<body>
    <div class="span6 offset3">
        <h1 class="offset1">Installation</h1>
        <h2 class="offset1"><small>Enter admin credentials</small></h2>
        <?php 
if ($model->hasErrors()) {
    ?>
            <?php 
    echo TbHtml::errorSummary($model);
    ?>
        <?php 
}
?>

        <form method="post" class="form-horizontal">

            <?php 
echo TbHtml::activeTextFieldControlGroup($model, 'username');
?>
            <?php 
echo TbHtml::activePasswordFieldControlGroup($model, 'password');
?>
            <?php 
echo TbHtml::activePasswordFieldControlGroup($model, 'password_verify');
开发者ID:xunicorn,项目名称:ebay-simple-watching,代码行数:31,代码来源:install.php

示例2:

<div class="success">
<?php 
    echo Yii::app()->user->getFlash('recoveryMessage');
    ?>
</div>
<?php 
} else {
    ?>

<div class="form">
<?php 
    echo TbHtml::beginForm();
    ?>

	<?php 
    echo TbHtml::errorSummary($form);
    ?>
	
	<div class="row-fluid">
		<?php 
    echo TbHtml::activeLabel($form, 'login_or_email');
    ?>
		<?php 
    echo TbHtml::activeTextField($form, 'login_or_email');
    ?>
		<p class="hint"><?php 
    echo UserModule::t("Please enter your login or email addres.");
    ?>
</p>
	</div>
	
开发者ID:Rudianasaja,项目名称:cycommerce,代码行数:30,代码来源:recovery.php

示例3: errorSummary

 /**
  * Displays a summary of validation errors for one or several models.
  * @param mixed $models the models whose input errors are to be displayed.
  * @param string $header a piece of HTML code that appears in front of the errors
  * @param string $footer a piece of HTML code that appears at the end of the errors
  * @param array $htmlOptions additional HTML attributes to be rendered in the container div tag.
  * @return string the error summary. Empty if no errors are found.
  */
 public function errorSummary($models, $header = null, $footer = null, $htmlOptions = array())
 {
     if (!$this->enableAjaxValidation && !$this->enableClientValidation) {
         return TbHtml::errorSummary($models, $header, $footer, $htmlOptions);
     }
     TbArray::defaultValue('id', $this->id . '_es_', $htmlOptions);
     $html = TbHtml::errorSummary($models, $header, $footer, $htmlOptions);
     if ($html === '') {
         if ($header === null) {
             $header = '<p>' . Yii::t('yii', 'Please fix the following input errors:') . '</p>';
         }
         TbHtml::addCssClass(TbHtml::$errorSummaryCss, $htmlOptions);
         TbHtml::addCssStyle('display:none', $htmlOptions);
         $html = CHtml::tag('div', $htmlOptions, $header . '<ul><li>dummy</li></ul>' . $footer);
     }
     $this->summaryID = $htmlOptions['id'];
     return $html;
 }
开发者ID:zwq,项目名称:unpei,代码行数:26,代码来源:TbActiveForm.php

示例4: testErrorSummary

 public function testErrorSummary()
 {
     $I = $this->codeGuy;
     $model = new Dummy();
     $model->addError('text', 'Error text');
     $html = TbHtml::errorSummary($model, 'Header text', 'Footer text', array('class' => 'summary'));
     $div = $I->createNode($html, 'div.alert');
     $I->seeNodeCssClass($div, 'alert-block alert-error summary');
     $I->seeNodePattern($div, '/^Header text/');
     $I->seeNodePattern($div, '/Footer text$/');
     $li = $div->filter('ul > li')->first();
     $I->seeNodeText($li, 'Error text');
 }
开发者ID:AlexanderGrant1,项目名称:AC41004,代码行数:13,代码来源:TbHtmlTest.php


注:本文中的TbHtml::errorSummary方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。