<?php echo $form->labelEx($model, 'description', array('class' => 'col-lg-2 control-label')); ?> <div class="col-lg-4"> <?php echo $form->textArea($model, 'description', array('class' => 'form-control', 'rows' => 3, 'maxlength' => 255)); ?> </div> </div> <div class="form-group"> <?php echo $form->labelEx($model, 'status', array('class' => 'col-lg-2 control-label')); ?> <div class="col-lg-4"> <?php echo $form->dropDownList($model, 'status', ModulesEnabled::getStatuses(), array('class' => 'form-control')); ?> </div> </div> <div class="clearfix form-actions"> <div class="col-lg-offset-2 col-lg-9"> <button class="btn btn-primary" type="submit"><i class="icon-ok bigger-110"></i> <?php echo Lang::t($model->isNewRecord ? 'Create' : 'Save changes'); ?> </button> <a class="btn" href="<?php echo $this->createUrl('index'); ?> "><i class="icon-remove bigger-110"></i><?php echo Lang::t('Cancel');
public function actionUpdateStatus($id, $status) { $this->hasPrivilege(Acl::ACTION_UPDATE); if (!array_key_exists($status, ModulesEnabled::getStatuses())) { throw new CHttpException(403, Lang::t('403_error')); } $model = ModulesEnabled::model()->loadModel($id); $model->status = $status; $model->save(FALSE); }