@@ -37,9 +37,6 @@ class MultipleInput extends InputWidget
3737
3838 const ICONS_SOURCE_GLYPHICONS = 'glyphicons ' ;
3939 const ICONS_SOURCE_FONTAWESOME = 'fa ' ;
40-
41- const GENERAL_ERROR_POS_TOP = 'top ' ;
42- const GENERAL_ERROR_POS_BOTTOM = 'bottom ' ;
4340
4441 /**
4542 * @var ActiveRecordInterface[]|array[] input data
@@ -208,16 +205,10 @@ class MultipleInput extends InputWidget
208205 */
209206 public $ theme = self ::THEME_BS ;
210207
211- /**
212- * @var string|null set a position of generic error message (when you set an error for generic field instead of particular input)
213- * If set to null no generic error message will be shown.
214- */
215- public $ generalErrorPosition ;
216-
217208 /**
218209 * @var bool
219210 */
220- private $ showGeneralError = false ;
211+ public $ showGeneralError = false ;
221212
222213 /**
223214 * Initialization.
@@ -230,14 +221,8 @@ public function init()
230221 throw new InvalidConfigException ('Property "form" must be an instance of yii\widgets\ActiveForm ' );
231222 }
232223
233- $ this ->showGeneralError = $ this ->generalErrorPosition !== null && !$ this ->isEmbedded && $ this ->field ;
234-
235- if ($ this ->showGeneralError ) {
236- if ($ this ->generalErrorPosition === self ::GENERAL_ERROR_POS_BOTTOM ) {
237- $ this ->field ->template = "{input} \n{error} " ;
238- } else {
239- $ this ->field ->template = "{error} \n{input} " ;
240- }
224+ if ($ this ->showGeneralError && $ this ->field === null ) {
225+ $ this ->showGeneralError = false ;
241226 }
242227
243228 $ this ->guessColumns ();
0 commit comments