From 24438f64f7b4d8f6de3cb2897d32701aa90044a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20H=C3=A4rtl?= Date: Mon, 28 Apr 2014 18:37:23 +0200 Subject: [PATCH] Remove empty ActiveField errors and fix bootstrap templates --- ActiveField.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ActiveField.php b/ActiveField.php index 1e04e76..1aa8c33 100644 --- a/ActiveField.php +++ b/ActiveField.php @@ -173,6 +173,9 @@ class ActiveField extends \yii\widgets\ActiveField } else { $this->template = "
\n{beginLabel}\n{input}\n{labelTitle}\n{endLabel}\n{error}\n{hint}\n
"; } + } else { + $this->template = $options['template']; + unset($options['template']); } $this->labelOptions['class'] = null; } @@ -189,6 +192,9 @@ class ActiveField extends \yii\widgets\ActiveField if ($this->inline) { if (!isset($options['template'])) { $this->template = "{label}\n{beginWrapper}\n{input}\n{error}\n{endWrapper}\n{hint}"; + } else { + $this->template = $options['template']; + unset($options['template']); } if (!isset($options['itemOptions'])) { $options['itemOptions'] = [ @@ -209,6 +215,9 @@ class ActiveField extends \yii\widgets\ActiveField if ($this->inline) { if (!isset($options['template'])) { $this->template = "{label}\n{beginWrapper}\n{input}\n{error}\n{endWrapper}\n{hint}"; + } else { + $this->template = $options['template']; + unset($options['template']); } if (!isset($options['itemOptions'])) { $options['itemOptions'] = [