Differential D25002 Diff 39 src/applications/conduit/controller/PhabricatorConduitTokenEditController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/conduit/controller/PhabricatorConduitTokenEditController.php
Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | if ($is_new) { | ||||
->addCancelButton($panel_uri); | ->addCancelButton($panel_uri); | ||||
} else { | } else { | ||||
$form = id(new AphrontFormView()) | $form = id(new AphrontFormView()) | ||||
->setUser($viewer); | ->setUser($viewer); | ||||
if ($token->getTokenType() === PhabricatorConduitToken::TYPE_CLUSTER) { | if ($token->getTokenType() === PhabricatorConduitToken::TYPE_CLUSTER) { | ||||
$dialog->appendChild( | $dialog->appendChild( | ||||
pht( | pht( | ||||
'This token is automatically generated by Phabricator, and used '. | 'This token is automatically generated by %s, and used '. | ||||
'to make requests between nodes in a Phabricator cluster. You '. | 'to make requests between nodes in a %s cluster. You '. | ||||
'can not use this token in external applications.')); | 'can not use this token in external applications.', | ||||
PhabricatorPlatformSite::getName(), | |||||
PhabricatorPlatformSite::getName())); | |||||
} else { | } else { | ||||
$form->appendChild( | $form->appendChild( | ||||
id(new AphrontFormTextControl()) | id(new AphrontFormTextControl()) | ||||
->setLabel(pht('Token')) | ->setLabel(pht('Token')) | ||||
->setValue($token->getToken())); | ->setValue($token->getToken())); | ||||
} | } | ||||
$dialog | $dialog | ||||
->appendForm($form) | ->appendForm($form) | ||||
->addCancelButton($panel_uri, pht('Done')); | ->addCancelButton($panel_uri, pht('Done')); | ||||
} | } | ||||
return $dialog; | return $dialog; | ||||
} | } | ||||
} | } |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0