Exemplo n.º 1
0
 /**
  * 主题设置
  * @return type
  */
 public function actionTheme()
 {
     $this->setMenus(8, "Theme Setting");
     $model = new ThemeConfig();
     if ($model->load(LsYii::getRequest()->post())) {
         $model->save($model->attributes);
         LsYii::setSuccessMessage(LsYii::gT('save success'));
     } else {
         $model = $model->initValue();
     }
     return $this->render('theme', ['model' => $model]);
 }
Exemplo n.º 2
0
/* @var $form ActiveForm */
$this->title = LsYii::gT("Theme Setting");
echo Message::getMessage();
?>
<div class="page-header">
    <h3>
        <strong><?php 
echo Html::encode($this->title);
?>
</strong>
    </h3>
</div>
<div class="config-basic">

    <?php 
$form = ActiveForm::begin(['id' => 'theme-config-form', 'options' => ['class' => 'form-horizontal']]);
?>
        <?php 
echo $form->field($model, 'admin_theme')->radioList(ThemeConfig::getAdminItems());
?>
        <?php 
echo $form->field($model, 'home_theme')->radioList(ThemeConfig::getHomeItems());
?>
        <?php 
Html::SubmitButtons("Save");
?>
    <?php 
ActiveForm::end();
?>

</div>