Example #1
0
echo $form->error($model, 'allow_follow');
?>
     
   </div>
 
  
    <div class="row" style="border-top: 1px dotted #CCC; padding-top:20px">
       <?php 
echo $form->labelEx($model, 'parent');
?>
        <p class="hint"><?php 
echo t('Use Select box or Autocomplete box for Parent Select : ');
?>
</p>
        <?php 
echo CHtml::dropDownList('parent', $model->parent, Page::getParentPages(false, $model->page_id), array('id' => 'parent_page_select'));
?>
        
        
        <?php 
$this->widget('CAutoComplete', array('name' => 'suggest_page', 'url' => array('suggestPage'), 'value' => Page::getPageName($model->parent), 'multiple' => false, 'mustMatch' => true, 'htmlOptions' => array('size' => 50, 'class' => 'maxWidthInput', 'id' => 'form_suggest_page'), 'methodChain' => ".result(function(event,item){ if(item!==undefined) \$(\"#parent_value\").val(item[1]); \$(\"#parent_page_select\").val(item[1])})"));
?>
        
        <input onClick="return changePageParent();" type="button" class="button" name="btnchangeParent" value="<?php 
echo t('Apply Parent Blocks');
?>
" />                      
        <?php 
echo $form->hiddenField($model, 'parent', array('id' => 'parent_value', 'value' => $model->parent === null ? 0 : $model->parent));
?>
        <?php