diff --git a/framework/widgets/ActiveForm.php b/framework/widgets/ActiveForm.php index b8c8f2c..2d47253 100644 --- a/framework/widgets/ActiveForm.php +++ b/framework/widgets/ActiveForm.php @@ -8,6 +8,7 @@ namespace yii\widgets; use Yii; +use yii\base\InvalidParamException; use yii\base\Widget; use yii\base\Model; use yii\util\Html; @@ -35,6 +36,7 @@ class ActiveForm extends Widget * @see errorSummary() */ public $errorSummaryClass = 'yii-error-summary'; + public $errorMessageClass = 'yii-error-message'; /** * @var string the default CSS class that indicates an input has error. * This is @@ -50,7 +52,10 @@ class ActiveForm extends Widget public $enableClientValidation = false; public $options = array(); - + /** + * @var array model-class mapped to name prefix + */ + public $modelMap; /** * @param Model|Model[] $models @@ -78,20 +83,22 @@ class ActiveForm extends Widget $header = isset($options['header']) ? $options['header'] : '

' . Yii::t('yii|Please fix the following errors:') . '

'; $footer = isset($options['footer']) ? $options['footer'] : ''; - $container = isset($options['container']) ? $options['container'] : 'div'; + $tag = isset($options['tag']) ? $options['tag'] : 'div'; unset($options['showAll'], $options['header'], $options['footer'], $options['container']); if (!isset($options['class'])) { $options['class'] = $this->errorSummaryClass; + } else { + $options['class'] .= ' ' . $this->errorSummaryClass; } if ($lines !== array()) { $content = "