[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[reclaim-ui] 391/459: fix requested attribute
From: |
gnunet |
Subject: |
[reclaim-ui] 391/459: fix requested attribute |
Date: |
Fri, 11 Jun 2021 23:28:03 +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 4c9e10a2323744c36ba1725ec4db75d29383d2cb
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Wed Dec 30 15:27:26 2020 +0900
fix requested attribute
---
src/app/edit-identity/edit-identity.component.html | 12 +++++++++---
src/app/edit-identity/edit-identity.component.ts | 6 ++++++
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/src/app/edit-identity/edit-identity.component.html
b/src/app/edit-identity/edit-identity.component.html
index 82a5aa6..39d7f15 100644
--- a/src/app/edit-identity/edit-identity.component.html
+++ b/src/app/edit-identity/edit-identity.component.html
@@ -129,21 +129,27 @@
</div>
<div class="col-sm" style="display:flex;">
<div style="flex:1;">
- <input *ngIf="!isClaimCred(newRequestedAttribute)"
placeholder="{{ getMessage('Value') }}"
[(ngModel)]="newRequestedAttribute.value">
+ <input *ngIf="!isClaimCred(newRequestedAttribute) &&
!isClaimCredentialRequested(newRequestedAttribute)"
+ placeholder="{{ getMessage('Value') }}"
[(ngModel)]="newRequestedAttribute.value">
<select class="custom-select"
- *ngIf="newRequestedAttribute.credential !== '' &&
isClaimCred(newRequestedAttribute)"
(change)="newRequestedAttribute.value=$event.target.value">
+ *ngIf="isClaimCredentialRequested(newRequestedAttribute)
&& credentials.length > 0"
(change)="newRequestedAttribute.value=$event.target.value">
<option [value]="getZeroId()" >{{
getMessage("edit_identity_html@selectClaim") }}</option>
<option *ngFor="let claim of
credentialValuesForClaim(newRequestedAttribute)" value={{claim.name}}>
{{claim.value}} <i>({{claim.name}})</i>
</option>
</select>
</div>
+ <div class="alert alert-warning"
+ *ngIf="(credentials.length == 0) &&
isClaimCredentialRequested(newRequestedAttribute)">
+ {{ getMessage("edit_identity_html@selfissued") }}
+ </div>
<div style="float:right;" *ngIf="credentials.length > 0">
<select class="custom-select"
[(ngModel)]="newRequestedAttribute.credential"
(change)="newRequestedAttribute.credential=$event.target.value;
newRequestedAttribute.flag = ($event.target.value == '') ? '0' : '1'" >
- <option value="">{{
getMessage("edit_identity_html@selfissued") }}</option>
+ <option
*ngIf="!isClaimCredentialRequested(newRequestedAttribute)"
+ [value]="getZeroId()">{{
getMessage("edit_identity_html@selfissued") }}</option>
<option *ngFor="let cred of credentials" value={{cred.id}}>
{{getIssuerName(cred)}}
</option>
diff --git a/src/app/edit-identity/edit-identity.component.ts
b/src/app/edit-identity/edit-identity.component.ts
index 2c52cdb..df71408 100644
--- a/src/app/edit-identity/edit-identity.component.ts
+++ b/src/app/edit-identity/edit-identity.component.ts
@@ -245,6 +245,12 @@ export class EditIdentityComponent implements OnInit {
const attribute = new Attribute('', '', this.getZeroId(), '', 'STRING',
'');
attribute.flag = '0';
attribute.name = claim;
+ if (this.isClaimCredentialRequested(attribute)) {
+ attribute.flag = '1';
+ if (this.credentials.length > 0) {
+ attribute.credential = this.credentials[0].id;
+ }
+ }
if (this.oidcService.isStandardProfileClaim(attribute)) {
this.missingProfileClaims.push(attribute);
} else if (this.oidcService.isStandardEmailClaim(attribute)) {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [reclaim-ui] 350/459: do not escape, (continued)
- [reclaim-ui] 350/459: do not escape, gnunet, 2021/06/11
- [reclaim-ui] 377/459: ignore some profile claims, gnunet, 2021/06/11
- [reclaim-ui] 384/459: move info for import, gnunet, 2021/06/11
- [reclaim-ui] 385/459: fix bugs with requested attributes, gnunet, 2021/06/11
- [reclaim-ui] 355/459: fix, gnunet, 2021/06/11
- [reclaim-ui] 375/459: blacklist some claims, gnunet, 2021/06/11
- [reclaim-ui] 378/459: update, gnunet, 2021/06/11
- [reclaim-ui] 379/459: minor, gnunet, 2021/06/11
- [reclaim-ui] 356/459: Merge branch 'master' of gitlab.com:reclaimid/ui, gnunet, 2021/06/11
- [reclaim-ui] 335/459: add template, gnunet, 2021/06/11
- [reclaim-ui] 391/459: fix requested attribute,
gnunet <=
- [reclaim-ui] 363/459: fix radio button, gnunet, 2021/06/11
- [reclaim-ui] 362/459: missing credential source, gnunet, 2021/06/11
- [reclaim-ui] 403/459: update state loading, gnunet, 2021/06/11
- [reclaim-ui] 361/459: authorization request dialog in identity list, gnunet, 2021/06/11
- [reclaim-ui] 370/459: build fix, gnunet, 2021/06/11
- [reclaim-ui] 364/459: fine tuning authorization, gnunet, 2021/06/11
- [reclaim-ui] 401/459: improve import logic and UI, gnunet, 2021/06/11
- [reclaim-ui] 320/459: works on chrome, gnunet, 2021/06/11
- [reclaim-ui] 342/459: Translated using Weblate (German), gnunet, 2021/06/11
- [reclaim-ui] 349/459: fix translations, gnunet, 2021/06/11