1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 12:00:55 +01:00

Fix some collateral damage from SSH Keypair generation

Summary: There's no `addHiddenInput()` on the layout view. Instead, build it
from the form. See: <https://github.com/facebook/phabricator/issues/538>.

Auditors: btrahan
This commit is contained in:
epriestley 2014-03-13 07:31:04 -07:00
parent f950985cfd
commit 58877a9b6c

View file

@ -211,14 +211,8 @@ final class PassphraseCredentialEditController extends PassphraseController {
$secret_control = $type->newSecretControl();
if ($request->isAjax()) {
$form = new PHUIFormLayoutView();
} else {
$form = id(new AphrontFormView())
->setUser($viewer);
}
$form
$form = id(new AphrontFormView())
->setUser($viewer)
->addHiddenInput('isInitialized', true)
->appendChild(
id(new AphrontFormTextControl())
@ -288,14 +282,16 @@ final class PassphraseCredentialEditController extends PassphraseController {
}
if ($request->isAjax()) {
$errors = id(new AphrontErrorView())->setErrors($errors);
if ($errors) {
$errors = id(new AphrontErrorView())->setErrors($errors);
}
$dialog = id(new AphrontDialogView())
->setUser($viewer)
->setWidth(AphrontDialogView::WIDTH_FORM)
->setTitle($title)
->appendChild($errors)
->appendChild($form)
->appendChild($form->buildLayoutView())
->addSubmitButton(pht('Create Credential'))
->addCancelButton($this->getApplicationURI());