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:
parent
f950985cfd
commit
58877a9b6c
1 changed files with 6 additions and 10 deletions
|
@ -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
|
||||
->setUser($viewer)
|
||||
->addHiddenInput('isInitialized', true)
|
||||
->appendChild(
|
||||
id(new AphrontFormTextControl())
|
||||
|
@ -288,14 +282,16 @@ final class PassphraseCredentialEditController extends PassphraseController {
|
|||
}
|
||||
|
||||
if ($request->isAjax()) {
|
||||
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());
|
||||
|
||||
|
|
Loading…
Reference in a new issue