public function actionChangePassword() { $model = new ChangePasswordForm(); if ($model->load(Yii::$app->request->post()) && $model->change()) { AlertHelper::appendAlert('success', Yii::t('happycode', 'Your password was changed.')); return $this->goBack(); } else { return $this->render('change-password', ['model' => $model]); } }
public function actionAdd() { $model = new AddCodeForm(); if ($model->load(Yii::$app->request->post()) && $model->add()) { AlertHelper::appendAlert('success', Yii::t('happycode', 'Your paste was successfully added and is currently waiting for administrator to approve it.')); return $this->redirect(['site/index']); } else { return $this->render('add-code', ['model' => $model]); } }
</head> <body> <?php $this->beginBody(); ?> <div class="wrap"> <?php echo $this->render('banner'); ?> <div class="container"> <?php echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]); ?> <?php echo AlertHelper::render(); ?> <?php echo $content; ?> </div> </div> <footer class="footer"> <div class="container"> <p class="pull-left">© Shitcode.net <?php echo date('Y'); ?> , <?php echo Yii::powered(); ?>