mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 14:00:56 +01:00
Allow to prefill name and description fields of a new Passphrase
Summary: Allow to prefill name and description fields of a new Passphrase Closes T15142 Test Plan: I've visited this URL in my local test installation: /passphrase/edit/?type=password&username=user&name=super&description=mario And I was able to see the Name and Description fields prefilled, just like the username. I also tried to put the query string on an already-existing element and it was working as expected, so, without any prefilled value from the query string. Reviewers: O1 Blessed Committers, avivey Reviewed By: O1 Blessed Committers, avivey Subscribers: avivey, speck, tobiaswiese, Matthew, Cigaryno Maniphest Tasks: T15142 Differential Revision: https://we.phorge.it/D25065
This commit is contained in:
parent
6a563a68b5
commit
83672ba949
1 changed files with 6 additions and 0 deletions
|
@ -45,6 +45,12 @@ final class PassphraseCredentialEditController extends PassphraseController {
|
||||||
// Prefill username if provided.
|
// Prefill username if provided.
|
||||||
$credential->setUsername((string)$request->getStr('username'));
|
$credential->setUsername((string)$request->getStr('username'));
|
||||||
|
|
||||||
|
// Prefill name if provided.
|
||||||
|
$credential->setName((string)$request->getStr('name'));
|
||||||
|
|
||||||
|
// Prefill description if provided.
|
||||||
|
$credential->setDescription((string)$request->getStr('description'));
|
||||||
|
|
||||||
if (!$request->getStr('isInitialized')) {
|
if (!$request->getStr('isInitialized')) {
|
||||||
$type->didInitializeNewCredential($viewer, $credential);
|
$type->didInitializeNewCredential($viewer, $credential);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue