<?php
echo CHtml::ajax(array('url' => array('dynamicTerms'), 'data' => array('q' => 'js:$(\'#content_type_box\').val()', 'lang' => 'js:$(\'#content_lang_box\').val()', 'YII_CSRF_TOKEN' => Yii::app()->getRequest()->getCsrfToken()), 'type' => 'post', 'dataType' => 'html', 'success' => "function(data)\n {\n \$('#term_id').empty();\n \$('#term_id').append(data);\n\n } "));
?>
}
</script>
<?php
echo $form->error($model, 'content_type');
?>
</div>
<div class="left" style="margin-left:20px">
<?php
echo $form->labelEx($model, 'terms');
?>
<?php
echo $form->listBox($model, 'terms', ContentList::getTerms(), array('id' => 'term_id', 'multiple' => 'multiple', 'style' => 'width:250px; height:100px', 'class' => 'listbox'));
?>
<?php
echo $form->error($model, 'terms');
?>
</div>
<div class="left">
<?php
echo $form->labelEx($model, 'tags');
?>
<?php
$this->widget('CAutoComplete', array('model' => $model, 'mustMatch' => true, 'attribute' => 'tags', 'url' => array('suggestTags'), 'multiple' => true, 'htmlOptions' => array('size' => 50, 'style' => 'width:300px')));
?>
<?php
echo $form->error($model, 'tags');