text("name"); if (!$form->populate(input())) return; $group = group::initNew($form->name, user::getCurrent()); } /* * Action: dm-pad-add - New pad modal */ if (isAction("dm-pad-add")) { $form = new form(); $form->text("owner"); $form->text("name"); if (!$form->populate(input())) return; $owner = agent::getAgentObj($form->owner); $user = user::getCurrent(); if (!$user->canCreateSub($owner)) { logError(ERROR, "You do not have permission to create a pad for '" . $owner->getDisplayName() . "'"); return; } $pad = pad::initNew($form->name, $owner); $td = stage::initNew("To Do", $pad); $ip = stage::initNew("In Progress", $pad); $pad->insertStage($td); $td->insertStage($ip); } ?>