|
10 | 10 |
|
11 | 11 | <div v-else> |
12 | 12 | <section> |
13 | | - <header>Credential type</header> |
14 | | - <select v-on:change="e => selectCredentialType(e.target.value)"> |
15 | | - <option :value="currentType" v-for="currentType in Object.keys(templates)" :key="currentType" |
16 | | - :selected="currentType === credentialType"> |
17 | | - {{ currentType }} |
18 | | - </option> |
19 | | - </select> |
20 | | - </section> |
| 13 | + <header>Credential properties</header> |
| 14 | + <div> |
| 15 | + <label for="type">Type</label> |
| 16 | + <select v-on:change="e => selectCredentialType(e.target.value)" id="type"> |
| 17 | + <option :value="currentType" v-for="currentType in Object.keys(templates)" :key="currentType" |
| 18 | + :selected="currentType === credentialType"> |
| 19 | + {{ currentType }} |
| 20 | + </option> |
| 21 | + </select> |
| 22 | + </div> |
21 | 23 |
|
22 | | - <section> |
23 | | - <header>Issuer DID</header> |
24 | 24 | <div> |
25 | | - <select v-on:change="selectIssuerDID"> |
| 25 | + <label for="issuerDID">Issuer DID</label> |
| 26 | + <select v-on:change="selectIssuerDID" id="issuerDID"> |
26 | 27 | <option disabled selected value>choose issuer DID</option> |
27 | 28 | <optgroup v-for="entry in subjects" :key="'subject-' + entry.subject" :label="entry.subject"> |
28 | 29 | <option :value="currentDID" v-for="currentDID in entry.dids" :key="'did-' + currentDID"> |
|
31 | 32 | </optgroup> |
32 | 33 | </select> |
33 | 34 | </div> |
34 | | - </section> |
35 | 35 |
|
36 | | - <section> |
37 | | - <header>Wallet DID</header> |
38 | | - <select v-on:change="selectSubjectDID" class="inline" style="width: 20%"> |
39 | | - <option disabled value="" selected>choose wallet DID</option> |
40 | | - <optgroup v-for="entry in subjects" :key="'subject-' + entry.subject" :label="entry.subject"> |
41 | | - <option :value="entry.subject + '/' + currentDID" v-for="currentDID in entry.dids" |
42 | | - :key="'did-' + currentDID"> |
43 | | - {{ currentDID }} |
44 | | - </option> |
45 | | - </optgroup> |
46 | | - </select> |
47 | | - <input type="text" v-model="subjectDID" placeholder="Enter a DID" class="inline" style="width: 80%"> |
48 | | - <p>The credential will be loaded into the wallet if it's owned by the local Nuts node.</p> |
49 | | - </section> |
50 | | - |
51 | | - <section v-if="template"> |
52 | | - <header>Fields</header> |
53 | 36 | <div> |
54 | | - <label :for="expirationDate"> |
55 | | - <p>Days valid</p> |
56 | | - </label> |
57 | | - <input id="daysValid" v-model="daysValid" type="number"> |
58 | | - <p>This will be used to set the credentials <code>expirationDate</code> property.</p> |
| 37 | + <label for="subjectDID">Wallet DID</label> |
| 38 | + <select v-on:change="selectSubjectDID" class="inline" style="width: 20%"> |
| 39 | + <option disabled value="" selected>choose wallet DID</option> |
| 40 | + <optgroup v-for="entry in subjects" :key="'subject-' + entry.subject" :label="entry.subject"> |
| 41 | + <option :value="entry.subject + '/' + currentDID" v-for="currentDID in entry.dids" |
| 42 | + :key="'did-' + currentDID"> |
| 43 | + {{ currentDID }} |
| 44 | + </option> |
| 45 | + </optgroup> |
| 46 | + </select> |
| 47 | + <input id="subjectDID" type="text" v-model="subjectDID" placeholder="Enter a DID" class="inline" style="width: 80%"> |
| 48 | + <p>The credential will be loaded into the wallet if it's owned by the local Nuts node.</p> |
59 | 49 | </div> |
60 | | - <div v-for="(field, idx) in template.fields" :key="field.name"> |
61 | | - <label :for="field.name"> |
62 | | - {{ field.name }} |
63 | | - <p>{{ field.description }}</p> |
64 | | - </label> |
65 | | - <input :id="field.name" v-model="credentialFields[idx]" type="text"> |
| 50 | + |
| 51 | + <div v-if="template"> |
| 52 | + <div> |
| 53 | + <label for="daysValid">Days valid</label> |
| 54 | + <input id="daysValid" v-model="daysValid" type="number"> |
| 55 | + <p>This will be used to set the credentials <code>expirationDate</code> property.</p> |
| 56 | + </div> |
| 57 | + <div v-for="(field, idx) in template.fields" :key="field.name"> |
| 58 | + <label :for="field.name"> |
| 59 | + {{ field.name }} |
| 60 | + <p>{{ field.description }}</p> |
| 61 | + </label> |
| 62 | + <input :id="field.name" v-model="credentialFields[idx]" type="text"> |
| 63 | + </div> |
66 | 64 | </div> |
67 | 65 | </section> |
68 | 66 |
|
|
0 commit comments