1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-03-28 04:00:17 +01:00

Make conduit certificate readonly and select-on-click

Summary: See comments in <https://secure.phabricator.com/D6331#comment-3> -- make the Conduit Token and Conduit Certificate interfaces readonly and select-on-click.

Test Plan:
  - Viewed `/conduit/token/`, verified it was readonly and selected on click.
  - Viewed `/settings/panel/conduit/`, likewise.

Reviewers: Avish, btrahan, wotte

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D7819
This commit is contained in:
epriestley 2013-12-23 10:43:53 -08:00
parent 81dcf6378d
commit 44c9a94abe
2 changed files with 8 additions and 0 deletions

View file

@ -38,6 +38,8 @@ final class PhabricatorConduitTokenController
'After you copy and paste this token, `arc` will complete '.
'the certificate install process for you.');
Javelin::initBehavior('select-on-click');
$form = id(new AphrontFormView())
->setUser($user)
->appendRemarkupInstructions($pre_instructions)
@ -45,6 +47,8 @@ final class PhabricatorConduitTokenController
id(new AphrontFormTextAreaControl())
->setLabel(pht('Token'))
->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_SHORT)
->setReadonly(true)
->setSigil('select-on-click')
->setValue($token->getToken()))
->appendRemarkupInstructions($post_instructions);

View file

@ -64,6 +64,8 @@ final class PhabricatorSettingsPanelConduit
$notice = null;
}
Javelin::initBehavior('select-on-click');
$cert_form = new AphrontFormView();
$cert_form
->setUser($user)
@ -77,6 +79,8 @@ final class PhabricatorSettingsPanelConduit
id(new AphrontFormTextAreaControl())
->setLabel(pht('Certificate'))
->setHeight(AphrontFormTextAreaControl::HEIGHT_SHORT)
->setReadonly(true)
->setSigil('select-on-click')
->setValue($user->getConduitCertificate()));
$cert_form = id(new PHUIObjectBoxView())