@@ -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} " ;
@@ -662,13 +658,11 @@ public function hint($content, $options = [])
662658 {
663659 if ($ this ->getConfigParam ('showHints ' ) === false ) {
664660 $ this ->parts ['{hint} ' ] = '' ;
665-
666661 return $ this ;
667662 }
668663 if ($ this ->_isHintSpecial ) {
669664 Html::addCssClass ($ options , 'kv-hint-block ' );
670665 }
671-
672666 return parent ::hint ($ this ->generateHint ($ content ), $ options );
673667 }
674668
@@ -946,7 +940,7 @@ public function widget($class, $config = [])
946940 */
947941 public function staticInput ($ options = [])
948942 {
949- $ content = $ this ->staticValue ?? Html::getAttributeValue ($ this ->model , $ this ->attribute );
943+ $ content = isset ( $ this ->staticValue ) ? $ this -> staticValue : Html::getAttributeValue ($ this ->model , $ this ->attribute );
950944 $ this ->form ->addCssClass ($ options , ActiveForm::BS_FORM_CONTROL_STATIC );
951945 $ this ->parts ['{input} ' ] = Html::tag ('div ' , $ content , $ options );
952946 $ this ->_isStatic = true ;
@@ -1188,7 +1182,7 @@ protected function initDisability(&$options)
11881182 */
11891183 protected function getConfigParam ($ param , $ default = true )
11901184 {
1191- return $ this ->$ param ?? ArrayHelper::getValue ($ this ->form ->formConfig , $ param , $ default );
1185+ return isset ( $ this ->$ param) ? $ this -> $ param : ArrayHelper::getValue ($ this ->form ->formConfig , $ param , $ default );
11921186 }
11931187
11941188 /**
0 commit comments