public function actionCreate() { $this->htmlOption = array('class' => 'icon-head head-products', 'header' => "添加币种", 'button' => array(array('class' => 'scalable save', 'id' => 'form-save', 'header' => '保存'))); $model = new currency(); if ($_POST['currency']) { $model->attributes = $_POST['currency']; if ($model->save()) { $this->redirect(array('index')); } } $this->constructScript('create'); $this->render('create', array('model' => $model)); }