gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[reclaim-ui] 394/459: fix default selection


From: gnunet
Subject: [reclaim-ui] 394/459: fix default selection
Date: Fri, 11 Jun 2021 23:28:06 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository reclaim-ui.

commit e62d58b32944a6a6cd531e7bd2ef2b8677af8dd8
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Wed Dec 30 16:15:11 2020 +0900

    fix default selection
---
 src/app/edit-identity/edit-identity.component.html | 3 ++-
 src/app/edit-identity/edit-identity.component.ts   | 8 +++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/app/edit-identity/edit-identity.component.html 
b/src/app/edit-identity/edit-identity.component.html
index 56ade45..c3b7446 100644
--- a/src/app/edit-identity/edit-identity.component.html
+++ b/src/app/edit-identity/edit-identity.component.html
@@ -120,9 +120,10 @@
              [class.alert-danger]="isInConflict(newRequestedAttribute)">
           <div class="col-sm">
             <select class="custom-select"
+              [ngModel]="newRequestedAttribute.name"
               (change)="setNewRequestedAttribute($event.target.value)">
               <option value="" >{{ 
getMessage("edit_identity_html@selectAttribute") }}</option>
-              <option *ngFor="let claim of getMissingClaims()" value={{claim}}>
+              <option *ngFor="let claim of getMissingClaims()" 
value={{claim.name}}>
                 {{getDescription(claim)}}
               </option>
             </select>
diff --git a/src/app/edit-identity/edit-identity.component.ts 
b/src/app/edit-identity/edit-identity.component.ts
index 0a5bc84..68b6309 100644
--- a/src/app/edit-identity/edit-identity.component.ts
+++ b/src/app/edit-identity/edit-identity.component.ts
@@ -792,10 +792,12 @@ export class EditIdentityComponent implements OnInit {
     return claims;
   }
 
-  setNewRequestedAttribute(attr: Attribute) {
-    this.newRequestedAttribute.name = attr.name;
+  setNewRequestedAttribute(attrName: string) {
+    this.resetAttribute(this.newRequestedAttribute);
+    this.newRequestedAttribute.name = attrName;
     this.newRequestedAttribute.flag = '0';
-    if (this.isClaimCredentialRequested(attr)) {
+    this.newRequestedAttribute.value = '';
+    if (this.isClaimCredentialRequested(this.newRequestedAttribute.name)) {
       this.newRequestedAttribute.flag = '1';
       if (this.credentials.length > 0) {
         this.newRequestedAttribute.credential = this.credentials[0].id;

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]