[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[reclaim-ui] 362/459: missing credential source
From: |
gnunet |
Subject: |
[reclaim-ui] 362/459: missing credential source |
Date: |
Fri, 11 Jun 2021 23:27:34 +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 eb25ce7792c2f47ad36703bc9359f1e9330c8b58
Author: anna wimbauer <anna.wibauer@gmx.de>
AuthorDate: Wed Oct 28 15:06:45 2020 +0100
missing credential source
---
src/app/edit-identity/edit-identity.component.html | 17 +++++++++++++----
src/app/edit-identity/edit-identity.component.ts | 4 ++++
src/locales/de/messages.json | 1 +
src/locales/en/messages.json | 1 +
4 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/src/app/edit-identity/edit-identity.component.html
b/src/app/edit-identity/edit-identity.component.html
index 44f8b3d..b4cb3ac 100644
--- a/src/app/edit-identity/edit-identity.component.html
+++ b/src/app/edit-identity/edit-identity.component.html
@@ -190,13 +190,16 @@
</div>
<input *ngIf="claim.flag == '0'" placeholder="{{
getMessage('Value') }}" [(ngModel)]="claim.value">
- <select *ngIf="claim.flag == '1'" class="custom-select"
+ <select *ngIf="claim.flag == '1' && hasCredentialSources()"
class="custom-select"
(change)="claim.credential=$event.target.value; " >
<option value="">{{
getMessage("edit_identity_html@selectSource") }}</option>
<option *ngFor="let cred of credentials" value={{cred.id}}>
{{cred.name}}
</option>
</select>
+ <div *ngIf="claim.flag == '1' && !hasCredentialSources()"
class="alert alert-primary" role="alert">
+ {{ getMessage("edit_identity_html@noCredentialSource") }}
+ </div>
<select class="custom-select"
*ngIf="(claim.credential !== '') && (claim.flag == '1')"
(change)="claim.value=$event.target.value">
@@ -231,16 +234,19 @@
<i *ngIf="isClaimRequested(missing)" class="fa
fa-openid"></i><b> {{missing.name}}</b></div></div>
<div class="col-sm">
<input *ngIf="!isClaimCredentialRequested(missing)"
placeholder="{{ getMessage('Value') }}" [(ngModel)]="missing.value">
- <select *ngIf="isClaimCredentialRequested(missing)"
class="custom-select" (change)="missing.credential=$event.target.value; ">
+ <select *ngIf="isClaimCredentialRequested(missing) &&
hasCredentialSources()" class="custom-select"
(change)="missing.credential=$event.target.value; ">
<option value="">{{
getMessage("edit_identity_html@selectSource") }}</option>
<option *ngFor="let cred of credentials" value={{cred.id}}>
{{cred.name}}
</option>
</select>
+ <div *ngIf="isClaimCredentialRequested(missing) &&
!hasCredentialSources()" class="alert alert-primary" role="alert">
+ {{ getMessage("edit_identity_html@noCredentialSource") }}
+ </div>
<select *ngIf="isClaimCredentialRequested(missing) &&
missing.credential !== ''" class="custom-select"
(change)="missing.value=$event.target.value">
<option value="">{{
getMessage("edit_identity_html@selectClaim") }}</option>
- <option *ngFor="let claim of credentialValuesForCred(missing)"
value={{claim.name}}>
+ <option *ngFor="let claim of
credentialValuesForClaim(missing)" value={{claim.name}}>
{{claim.value}} <i>({{claim.name}})</i>
</option>
</select>
@@ -296,13 +302,16 @@
</div>
</div>
<input *ngIf="newAttribute.flag == '0'" placeholder="{{
getMessage('Value') }}"
[class.text-danger]="!attributeValueValid(newAttribute)"
[(ngModel)]="newAttribute.value">
- <select *ngIf="newAttribute.flag == '1'" class="custom-select"
+ <select *ngIf="newAttribute.flag == '1' &&
hasCredentialSources()" class="custom-select"
(change)="newAttribute.credential=$event.target.value; " >
<option value="">{{
getMessage("edit_identity_html@selectSource") }}</option>
<option *ngFor="let cred of credentials" value={{cred.id}}>
{{cred.name}}
</option>
</select>
+ <div *ngIf="newAttribute.flag == '1' && !hasCredentialSources()"
class="alert alert-primary" role="alert">
+ {{ getMessage("edit_identity_html@noCredentialSource") }}
+ </div>
<select class="custom-select"
*ngIf="newAttribute.credential !== '' && newAttribute.flag ==
'1'" (change)="newAttribute.value=$event.target.value">
diff --git a/src/app/edit-identity/edit-identity.component.ts
b/src/app/edit-identity/edit-identity.component.ts
index 9575af3..6ed4e24 100644
--- a/src/app/edit-identity/edit-identity.component.ts
+++ b/src/app/edit-identity/edit-identity.component.ts
@@ -483,6 +483,10 @@ export class EditIdentityComponent implements OnInit {
}
}
+ hasCredentialSources(){
+ return this.credentials.length > 0
+ }
+
//FIXME credentials need an issuer field
getIssuer(attribute: Attribute) {
for (let i = 0; i < this.credentials.length; i++) {
diff --git a/src/locales/de/messages.json b/src/locales/de/messages.json
index f14d403..b999048 100644
--- a/src/locales/de/messages.json
+++ b/src/locales/de/messages.json
@@ -56,6 +56,7 @@
"edit_identity_html@plain": "Text",
"edit_identity_html@credential": "Attestierung",
"edit_identity_html@selectSource": "Quelle der Attestierung",
+ "edit_identity_html@noCredentialSource": "Du hast noch keine
Attestierungsquellen",
"edit_identity_html@selectClaim": "Attestierung auswählen",
"edit_identity_html@additionalInfo": "Mehr Informationen",
"edit_identity_html@non_standardClaims": "Nicht-standartisierte attribute
welche nicht explizit in OpenID Connect definiert sind.",
diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json
index 0feb9d0..42be71a 100644
--- a/src/locales/en/messages.json
+++ b/src/locales/en/messages.json
@@ -56,6 +56,7 @@
"edit_identity_html@plain": "Plain",
"edit_identity_html@credential": "Credential",
"edit_identity_html@selectSource": "Select credential source",
+ "edit_identity_html@noCredentialSource": "You haven't added any credential
sources yet.",
"edit_identity_html@selectClaim": "Select claim",
"edit_identity_html@additionalInfo": "Additional information",
"edit_identity_html@non_standardClaims": "Non-standard claims which are
not explicitly covered in the OpenID Connect core specification.",
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [reclaim-ui] 384/459: move info for import, (continued)
- [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, 2021/06/11
- [reclaim-ui] 363/459: fix radio button, gnunet, 2021/06/11
- [reclaim-ui] 362/459: missing credential source,
gnunet <=
- [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
- [reclaim-ui] 387/459: update, gnunet, 2021/06/11
- [reclaim-ui] 358/459: clean up, gnunet, 2021/06/11