public static function getContentType() { $types = GxcHelpers::getAvailableContentType(); $result = array('all' => t('All')); foreach ($types as $key => $value) { $result[$key] = $value['name']; } return $result; }
<?php echo $form->labelEx($model, 'lang'); ?> <?php echo $form->listBox($model, 'lang', ContentList::getContentLang(), array('multiple' => 'multiple', 'style' => 'width:150px; height:70px', 'class' => 'listbox', 'id' => 'content_lang_box')); ?> <?php echo $form->error($model, 'lang'); ?> </div> <div class="left" style="margin-left:20px"> <?php echo $form->labelEx($model, 'content_type'); ?> <?php echo $form->listBox($model, 'content_type', ContentList::getContentType(), array('multiple' => 'multiple', 'style' => 'width:250px; height:70px', 'class' => 'listbox', 'id' => 'content_type_box')); ?> <script> $(document).ready(function () { $('#content_type_box').change(function() { changeTerms(); }); $('#content_lang_box').change(function() { changeTerms(); });