/**
  * @return bool
  */
 function removeRule()
 {
     $this->setHeaders();
     $this->getOutput()->setPagetitle($this->msg('openstackmanager-removerule'));
     $project = $this->getRequest()->getText('project');
     $region = $this->getRequest()->getText('region');
     if (!$this->userLDAP->inRole('projectadmin', $project)) {
         $this->notInRole('projectadmin', $project);
         return false;
     }
     $groupid = $this->getRequest()->getText('groupid');
     $ruleid = $this->getRequest()->getText('ruleid');
     if (!$this->getRequest()->wasPosted()) {
         $securitygroup = $this->userNova->getSecurityGroup($groupid);
         if ($securitygroup) {
             $securitygroupname = $securitygroup->getGroupName();
             $this->getOutput()->addWikiMsg('openstackmanager-removerule-confirm', $securitygroupname);
         } else {
             $this->getOutput()->addWikiMsg('openstackmanager-nonexistantsecuritygroup');
             return false;
         }
     }
     $securityGroupInfo = array();
     $securityGroupInfo['groupid'] = array('type' => 'hidden', 'default' => $groupid, 'name' => 'groupid');
     $securityGroupInfo['ruleid'] = array('type' => 'hidden', 'default' => $ruleid, 'name' => 'ruleid');
     $securityGroupInfo['project'] = array('type' => 'hidden', 'default' => $project, 'name' => 'project');
     $securityGroupInfo['region'] = array('type' => 'hidden', 'default' => $region, 'name' => 'region');
     $securityGroupInfo['action'] = array('type' => 'hidden', 'default' => 'removerule', 'name' => 'action');
     $securityGroupForm = new HTMLForm($securityGroupInfo, $this->getContext(), 'openstackmanager-novasecuritygroup');
     $securityGroupForm->setSubmitID('novainstance-form-removerulesubmit');
     $securityGroupForm->setSubmitCallback(array($this, 'tryRemoveRuleSubmit'));
     $securityGroupForm->show();
     return true;
 }