1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-29 18:22:41 +01:00

Update passphrase edit UI

Summary: Updates creating credentials

Test Plan: create some notes

Reviewers: epriestley

Reviewed By: epriestley

Spies: Korvin

Differential Revision: https://secure.phabricator.com/D18570
This commit is contained in:
Chad Little 2017-09-07 13:08:10 -07:00
parent f9b109dc0d
commit f1193afa94
3 changed files with 5 additions and 23 deletions

View file

@ -238,8 +238,6 @@ final class HeraldRuleController extends HeraldController {
? pht('Edit Herald Rule: %s', $rule->getName()) ? pht('Edit Herald Rule: %s', $rule->getName())
: pht('Create Herald Rule: %s', idx($content_type_map, $content_type)); : pht('Create Herald Rule: %s', idx($content_type_map, $content_type));
$icon = $rule->getID() ? 'fa-pencil' : 'fa-plus-square';
$form_box = id(new PHUIObjectBoxView()) $form_box = id(new PHUIObjectBoxView())
->setHeaderText($title) ->setHeaderText($title)
->setBackground(PHUIObjectBoxView::WHITE_CONFIG) ->setBackground(PHUIObjectBoxView::WHITE_CONFIG)

View file

@ -52,17 +52,12 @@ final class PassphraseCredentialCreateController extends PassphraseController {
$crumbs->setBorder(true); $crumbs->setBorder(true);
$box = id(new PHUIObjectBoxView()) $box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Credential')) ->setHeaderText($title)
->setFormErrors($errors) ->setFormErrors($errors)
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) ->setBackground(PHUIObjectBoxView::WHITE_CONFIG)
->setForm($form); ->setForm($form);
$header = id(new PHUIHeaderView())
->setHeader($title)
->setHeaderIcon('fa-plus-square');
$view = id(new PHUITwoColumnView()) $view = id(new PHUITwoColumnView())
->setHeader($header)
->setFooter($box); ->setFooter($box);
return $this->newPage() return $this->newPage()

View file

@ -249,10 +249,6 @@ final class PassphraseCredentialEditController extends PassphraseController {
->setName('description') ->setName('description')
->setLabel(pht('Description')) ->setLabel(pht('Description'))
->setValue($v_desc)) ->setValue($v_desc))
->appendChild(
id(new AphrontFormMarkupControl())
->setLabel(pht('Credential Type'))
->setValue($type->getCredentialTypeName()))
->appendChild( ->appendChild(
id(new AphrontFormDividerControl())) id(new AphrontFormDividerControl()))
->appendControl( ->appendControl(
@ -322,10 +318,9 @@ final class PassphraseCredentialEditController extends PassphraseController {
$crumbs->setBorder(true); $crumbs->setBorder(true);
if ($is_new) { if ($is_new) {
$title = pht('Create New Credential'); $title = pht('New Credential: %s', $type->getCredentialTypeName());
$crumbs->addTextCrumb(pht('Create')); $crumbs->addTextCrumb(pht('Create'));
$cancel_uri = $this->getApplicationURI(); $cancel_uri = $this->getApplicationURI();
$header_icon = 'fa-plus-square';
} else { } else {
$title = pht('Edit Credential: %s', $credential->getName()); $title = pht('Edit Credential: %s', $credential->getName());
$crumbs->addTextCrumb( $crumbs->addTextCrumb(
@ -333,7 +328,6 @@ final class PassphraseCredentialEditController extends PassphraseController {
'/K'.$credential->getID()); '/K'.$credential->getID());
$crumbs->addTextCrumb(pht('Edit')); $crumbs->addTextCrumb(pht('Edit'));
$cancel_uri = '/K'.$credential->getID(); $cancel_uri = '/K'.$credential->getID();
$header_icon = 'fa-pencil';
} }
if ($request->isAjax()) { if ($request->isAjax()) {
@ -356,18 +350,13 @@ final class PassphraseCredentialEditController extends PassphraseController {
->addCancelButton($cancel_uri)); ->addCancelButton($cancel_uri));
$box = id(new PHUIObjectBoxView()) $box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Credential')) ->setHeaderText($title)
->setFormErrors($errors) ->setFormErrors($errors)
->setValidationException($validation_exception) ->setValidationException($validation_exception)
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) ->setBackground(PHUIObjectBoxView::WHITE_CONFIG)
->setForm($form); ->setForm($form);
$header = id(new PHUIHeaderView())
->setHeader($title)
->setHeaderIcon($header_icon);
$view = id(new PHUITwoColumnView()) $view = id(new PHUITwoColumnView())
->setHeader($header)
->setFooter(array( ->setFooter(array(
$box, $box,
)); ));