1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-19 13:22:42 +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(); $secret_control = $type->newSecretControl();
if ($request->isAjax()) { $form = id(new AphrontFormView())
$form = new PHUIFormLayoutView(); ->setUser($viewer)
} else {
$form = id(new AphrontFormView())
->setUser($viewer);
}
$form
->addHiddenInput('isInitialized', true) ->addHiddenInput('isInitialized', true)
->appendChild( ->appendChild(
id(new AphrontFormTextControl()) id(new AphrontFormTextControl())
@ -288,14 +282,16 @@ final class PassphraseCredentialEditController extends PassphraseController {
} }
if ($request->isAjax()) { if ($request->isAjax()) {
$errors = id(new AphrontErrorView())->setErrors($errors); if ($errors) {
$errors = id(new AphrontErrorView())->setErrors($errors);
}
$dialog = id(new AphrontDialogView()) $dialog = id(new AphrontDialogView())
->setUser($viewer) ->setUser($viewer)
->setWidth(AphrontDialogView::WIDTH_FORM) ->setWidth(AphrontDialogView::WIDTH_FORM)
->setTitle($title) ->setTitle($title)
->appendChild($errors) ->appendChild($errors)
->appendChild($form) ->appendChild($form->buildLayoutView())
->addSubmitButton(pht('Create Credential')) ->addSubmitButton(pht('Create Credential'))
->addCancelButton($this->getApplicationURI()); ->addCancelButton($this->getApplicationURI());