Fixed issue #<9187>

correct if statement
make the checkbox YII-like