mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-10 14:51:06 +01:00
Clean up some Passphrase transaction bugs
Summary: Ref T12685. Makes the description field full remarkup and fixes setting a credential secret after destruction. Test Plan: Change description a lot, set and destroy credentials. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T12685 Differential Revision: https://secure.phabricator.com/D17851
This commit is contained in:
parent
ade380530f
commit
c505876d61
2 changed files with 7 additions and 11 deletions
|
@ -244,8 +244,8 @@ final class PassphraseCredentialEditController extends PassphraseController {
|
|||
->setValue($v_name)
|
||||
->setError($e_name))
|
||||
->appendChild(
|
||||
id(new AphrontFormTextAreaControl())
|
||||
->setHeight(AphrontFormTextAreaControl::HEIGHT_VERY_SHORT)
|
||||
id(new PhabricatorRemarkupControl())
|
||||
->setUser($viewer)
|
||||
->setName('description')
|
||||
->setLabel(pht('Description'))
|
||||
->setValue($v_desc))
|
||||
|
|
|
@ -17,17 +17,9 @@ final class PassphraseCredentialSecretIDTransaction
|
|||
$object->setSecretID($value);
|
||||
}
|
||||
|
||||
public function shouldHide() {
|
||||
if (!$this->getOldValue()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getTitle() {
|
||||
$old = $this->getOldValue();
|
||||
if ($old === null) {
|
||||
if (!$old) {
|
||||
return pht(
|
||||
'%s attached a new secret to this credential.',
|
||||
$this->renderAuthor());
|
||||
|
@ -53,4 +45,8 @@ final class PassphraseCredentialSecretIDTransaction
|
|||
}
|
||||
}
|
||||
|
||||
public function getIcon() {
|
||||
return 'fa-key';
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue