Am I doing something wrong or when a model with errors is rendered the validation errors are showed but not in red (this because the error class is not added)?
<?php echo $form->dropDownListRow(
$model, //1st: model
'id', //2nd: attribute
CHtml::listData( //3rd: data
User::model()->findAll(), // dataProvider
'id', // attribute to be used as option value
'username' // attribute to be displayed
),
array( //4th: additional htmlOptions
)
); ?>
Of course you can use additional attributes and/or criteria to limit the user list with findAll().
Can someone please confirm if this is a extension issue.
On a horizontal form turning off javascript or setting enableAjaxValidation and enableClientValidation to false when a form is submited an attribute that is valid, has no errors, doesn’t became green because the class “success” is no added?
If it is a issue a quick fix could be changing in BootInput.php:
protected function getContainerCssClass()
{
if ($this->model->hasErrors($this->attribute)) //I changed this before this issue, I posted why
return CHtml::$errorCss;
else
if (Yii::app()->request->isPostRequest)
return 'success';
else
return '';
}
Ok, soo if it has no errors and is a request of type POST I assume that it is a form submit and that the model has been validated and it is a valid attribute, so I add the class "success". If the attribute has no errors and the request is not of type POST no CSS class is added.
Some recommendations?
Also on CActiveRecord::onAfterVAlidate() could set some propertie indicating that the model validation has occurred and use it on BootInput::getContainerCssClass().
I’m not a very experienced web developer so I might be missing something trivial, but once I had bootstrap preloaded, all my other jquery based extensions (fancybox, fbgallery etc) became pretty messed up. For example fancybox does not popup because the script crashes when calling hide() on a div, fbgallery has similar issues with jquery ui dialogs. Is there a conflict between bootstrap based and traditional jquery/jquery ui/CJui based widgets? Or is there some version incompatibility?