예제 #1
0
파일: _form.php 프로젝트: Saltly/SourceBans
      <?php 
echo $form->textArea($model, 'reason', array('size' => 60, 'maxlength' => 255));
?>
      <?php 
echo $form->error($model, 'reason');
?>
    </div>
  </div>

  <div class="control-group">
    <?php 
echo $form->label($model, 'length', array('class' => 'control-label'));
?>
    <div class="controls">
      <?php 
echo $form->dropDownList($model, 'length', SBBan::getTimes());
?>
      <?php 
echo $form->error($model, 'length');
?>
    </div>
  </div>

<?php 
if ($model->isNewRecord) {
    ?>
  <div class="control-group">
    <?php 
    echo CHtml::label($model->getAttributeLabel('demo.filename'), 'SBDemo_filename', array('class' => 'control-label'));
    ?>
    <div class="controls">
예제 #2
0
echo $form->label($model, 'create_time', array('class' => 'control-label'));
?>
    <div class="controls">
      <?php 
echo $form->textField($model, 'create_time');
?>
    </div>
  </div>

  <div class="control-group">
    <?php 
echo $form->label($model, 'length', array('class' => 'control-label'));
?>
    <div class="controls">
      <?php 
echo $form->dropDownList($model, 'length', SBBan::getTimes(), array('empty' => '- ' . Yii::t('sourcebans', 'None') . ' -'));
?>
    </div>
  </div>

  <div class="control-group">
    <?php 
echo $form->label($model, 'admin_id', array('class' => 'control-label'));
?>
    <div class="controls">
      <?php 
echo $form->dropDownList($model, 'admin_id', CHtml::listData(SBAdmin::model()->findAll(array('order' => 'name')), 'id', 'name'), array('empty' => '- ' . Yii::t('sourcebans', 'None') . ' -'));
?>
    </div>
  </div>