@@ -493,7 +493,7 @@ protected function createLayoutConfig($instanceConfig = [])
493493 $ layout = $ form ->type ;
494494 $ bsVer = $ form ->getBsVer ();
495495 $ config = [
496- 'hintOptions ' => ['tag ' => 'div ' , 'class ' => ['form-text ' , ' text-muted ' , ' small ' ]],
496+ 'hintOptions ' => ['tag ' => 'div ' , 'class ' => ['hint-block ' ]],
497497 'errorOptions ' => ['tag ' => 'div ' , 'class ' => 'invalid-feedback ' ],
498498 'inputOptions ' => ['class ' => 'form-control ' ],
499499 'labelOptions ' => ['class ' => ['form-label ' ]],
@@ -502,11 +502,7 @@ protected function createLayoutConfig($instanceConfig = [])
502502 if ($ bsVer === 4 ) {
503503 $ config ['labelOptions ' ] = ['class ' => []];
504504 } elseif ($ bsVer === 3 ) {
505- $ config = [
506- 'hintOptions ' => ['tag ' => 'p ' , 'class ' => ['help-block ' ]],
507- 'errorOptions ' => ['tag ' => 'p ' , 'class ' => 'help-block help-block-error ' ],
508- 'inputOptions ' => ['class ' => 'form-control ' ],
509- ];
505+ $ config ['errorOptions ' ] = ['tag ' => 'div ' , 'class ' => 'help-block help-block-error ' ];
510506 }
511507 if ($ layout === ActiveForm::TYPE_HORIZONTAL ) {
512508 $ config ['template ' ] = "{label} \n{beginWrapper} \n{input} \n{error} \n{hint} \n{endWrapper} " ;
@@ -665,9 +661,6 @@ public function hint($content, $options = [])
665661
666662 return $ this ;
667663 }
668- if ($ this ->_isHintSpecial ) {
669- Html::addCssClass ($ options , 'kv-hint-block ' );
670- }
671664
672665 return parent ::hint ($ this ->generateHint ($ content ), $ options );
673666 }
@@ -946,7 +939,7 @@ public function widget($class, $config = [])
946939 */
947940 public function staticInput ($ options = [])
948941 {
949- $ content = $ this ->staticValue ?? Html::getAttributeValue ($ this ->model , $ this ->attribute );
942+ $ content = isset ( $ this ->staticValue ) ? $ this -> staticValue : Html::getAttributeValue ($ this ->model , $ this ->attribute );
950943 $ this ->form ->addCssClass ($ options , ActiveForm::BS_FORM_CONTROL_STATIC );
951944 $ this ->parts ['{input} ' ] = Html::tag ('div ' , $ content , $ options );
952945 $ this ->_isStatic = true ;
@@ -1188,7 +1181,7 @@ protected function initDisability(&$options)
11881181 */
11891182 protected function getConfigParam ($ param , $ default = true )
11901183 {
1191- return $ this ->$ param ?? ArrayHelper::getValue ($ this ->form ->formConfig , $ param , $ default );
1184+ return isset ( $ this ->$ param) ? $ this -> $ param : ArrayHelper::getValue ($ this ->form ->formConfig , $ param , $ default );
11921185 }
11931186
11941187 /**
0 commit comments