<?php 

$settings = NotificationSetting::getUserNotificationSettings();

$settings = array_convert_ex($settings, function($k,$v){
  return $v->id;
}, function($k,$v){
  return $v->description;
});

  $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array(
      'id'=>'notification-form',
      'enableAjaxValidation'=>false,
  ));

  ?>

<p class="help-block">
	<?php echo(t('Fields with <span class="required">*</span> are required.')); ?>
</p>

<?php 

echo $form->errorSummary($model);

echo $form->dropDownListRow($model,'setting_id',$settings,array('class'=>'span5','maxlength'=>10));

echo $form->textFieldRow($model,'object_id',array('class'=>'span5','maxlength'=>10));

echo $form->dropDownListRow($model,'status',Notification::getAllStatus(),array('class'=>'span5','maxlength'=>255));

echo $form->textFieldRow($model,'read',array('class'=>'span5'));

echo $form->textFieldRow($model,'epoch',array('class'=>'span5'));

?>

<div class="form-actions">
	<?php $this->widget('bootstrap.widgets.TbButton', array(
	    'buttonType'=>'submit',
	    'type'=>'primary',
	    'label'=>$model->isNewRecord ? 'Create' : 'Save',
		)); ?>
</div>

<?php $this->endWidget(); ?>
