private function processDelete(AphrontRequest $request, PhabricatorUserSSHKey $key) { $user = $request->getUser(); $name = phutil_escape_html($key->getName()); if ($request->isDialogFormPost()) { $key->delete(); return id(new AphrontReloadResponse())->setURI($this->getPanelURI()); } $dialog = id(new AphrontDialogView())->setUser($user)->addHiddenInput('delete', $key->getID())->setTitle('Really delete SSH Public Key?')->appendChild('<p>The key "<strong>' . $name . '</strong>" will be permanently deleted, ' . 'and you will not longer be able to use the corresponding private key ' . 'to authenticate.</p>')->addSubmitButton('Delete Public Key')->addCancelButton($this->getPanelURI()); return id(new AphrontDialogResponse())->setDialog($dialog); }
private function processDelete(AphrontRequest $request, PhabricatorUserSSHKey $key) { $viewer = $request->getUser(); $user = $this->getUser(); $name = phutil_tag('strong', array(), $key->getName()); if ($request->isDialogFormPost()) { $key->delete(); return id(new AphrontReloadResponse())->setURI($this->getPanelURI()); } $dialog = id(new AphrontDialogView())->setUser($viewer)->addHiddenInput('delete', $key->getID())->setTitle(pht('Really delete SSH Public Key?'))->appendChild(phutil_tag('p', array(), pht('The key "%s" will be permanently deleted, and you will not longer be ' . 'able to use the corresponding private key to authenticate.', $name)))->addSubmitButton(pht('Delete Public Key'))->addCancelButton($this->getPanelURI()); return id(new AphrontDialogResponse())->setDialog($dialog); }