/**
* Edits or adds a Procedure.
*
* @param bool|int $id
*
* @throws CHttpException
*/
public function actionEdit($id = false)
{
$admin = new Admin(UniqueCodes::model(), $this);
if ($id) {
$admin->setModelId($id);
}
$admin->setModelDisplayName('Unique Codes');
$admin->setEditFields(array('code' => 'label', 'active' => 'checkbox'));
$admin->editModel();
}