@@ -682,9 +682,8 @@ impl FormState {
682682
683683 /// An edit form for `entry`, prefilled with the metadata the list already
684684 /// carries (name / username / folder). For a card, `detail` (the pane's
685- /// on-select fetch) prefills `Brand`/`Expiry`. Secrets stay blank — blank
686- /// means "leave unchanged" on submit (so does the un-prefilled cardholder,
687- /// which has no fetch selector yet).
685+ /// on-select fetch) prefills `Holder`/`Brand`/`Expiry`. Secrets stay blank —
686+ /// blank means "leave unchanged" on submit.
688687 #[ must_use]
689688 pub fn new_edit ( entry : & ListEntry , detail : Option < & DetailView > ) -> Self {
690689 let mut fields = Self :: blank_fields ( ) ;
@@ -705,6 +704,7 @@ impl FormState {
705704 // pane's `Person`/`Address` are composites that can't be split
706705 // back, so those rows start blank = leave-unchanged.
707706 match ( entry. cipher_type , label. as_str ( ) ) {
707+ ( 3 , "Holder" ) => prefill ( F_CARDHOLDER , value) ,
708708 ( 3 , "Brand" ) => prefill ( F_BRAND , value) ,
709709 ( 3 , "Exp" ) => prefill ( F_EXPIRY , value) ,
710710 ( 4 , "Email" ) => prefill ( F_EMAIL , value) ,
@@ -2526,6 +2526,7 @@ mod tests {
25262526 app. detail = Some ( DetailView {
25272527 id : "id-visa" . to_owned ( ) ,
25282528 lines : vec ! [
2529+ ( "Holder" . to_owned( ) , "A. Cardholder" . to_owned( ) ) ,
25292530 ( "Brand" . to_owned( ) , "Visa" . to_owned( ) ) ,
25302531 ( "Exp" . to_owned( ) , "04/2030" . to_owned( ) ) ,
25312532 ] ,
@@ -2540,6 +2541,7 @@ mod tests {
25402541 . map ( |r| r. value . to_owned ( ) )
25412542 . expect ( "row exists" )
25422543 } ;
2544+ assert_eq ! ( value_of( "Holder" ) , "A. Cardholder" ) ;
25432545 assert_eq ! ( value_of( "Brand" ) , "Visa" ) ;
25442546 assert_eq ! ( value_of( "Expiry" ) , "04/2030" ) ;
25452547 assert_eq ! ( value_of( "Number" ) , "" , "secrets are never prefilled" ) ;
0 commit comments