diff --git a/package.json b/package.json index 67854416e261df740072e7e03bc6d8224c4d123f..eaae77131b7eb23fb41eac78716b64a7a63a437c 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "@dbp-toolkit/language-select": "^0.2.0", "@dbp-toolkit/notification": "^0.2.0", "@dbp-toolkit/person-profile": "^0.2.0", + "@dbp-toolkit/organization-select": "^0.2.0", "@digital-blueprint/annotpdf": "^1.0.13a", "@open-wc/scoped-elements": "^1.1.1", "fabric": "^4.2.0", diff --git a/src/dbp-official-signature-pdf-upload.js b/src/dbp-official-signature-pdf-upload.js index 9330f3ba34a38e81cfa032c947fac2a77a34bac7..4bf6e84b51f27e3f26279aafc825634a19c8c3a7 100644 --- a/src/dbp-official-signature-pdf-upload.js +++ b/src/dbp-official-signature-pdf-upload.js @@ -16,6 +16,7 @@ import {FileSink} from "@dbp-toolkit/file-handling"; import {name as pkgName} from './../package.json'; import {getPDFSignatureCount} from './utils.js'; import {send as notify} from '@dbp-toolkit/common/notification'; +import {OrganizationSelect} from "@dbp-toolkit/organization-select"; const i18n = createI18nInstance(); @@ -61,6 +62,7 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitElem 'dbp-mini-spinner': MiniSpinner, 'dbp-button': Button, 'dbp-textswitch': TextSwitch, + 'dbp-organization-select': OrganizationSelect, }; } @@ -791,7 +793,9 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitElem results.push(html` <div class="annotation-block" class="annotation-block-${key}-${id}"> <input type="text" .value="${data.key1}" @change=${e => { this.updateAnnotation(key, id, 'key1', e.target.value); }} placeholder="key1" /> - <input type="text" .value="${data.key2}" @change=${e => { this.updateAnnotation(key, id, 'key2', e.target.value); }} placeholder="key2" /> + <dbp-organization-select subscribe="lang:lang,entry-point-url:entry-point-url,auth:auth" + value="${data.key2}" + @change=${e => { this.updateAnnotation(key, id, 'key2', JSON.parse(e.target.getAttribute("data-object")).alternateName); }}></dbp-organization-select> <input type="text" .value="${data.value}" @change=${e => { this.updateAnnotation(key, id, 'value', e.target.value); }} placeholder="value" /> <button class="button" title="Remove annotation" diff --git a/src/dbp-signature-lit-element.js b/src/dbp-signature-lit-element.js index 5be8782b9e07f085931be4d45f10987b2f50c8f9..60b0c0a1564f3f50d76b563b53a568f2f572713d 100644 --- a/src/dbp-signature-lit-element.js +++ b/src/dbp-signature-lit-element.js @@ -128,7 +128,7 @@ export default class DBPSignatureLitElement extends DBPSignatureBaseLitElement { // TODO: remove key/value presets const number = Math.floor((Math.random() * 1000) + 1); - this.queuedFilesAnnotations[key].push({'key1': 'geschaeftszahl', 'key2': 'F' + number, 'value': 'my value ' + number}); + this.queuedFilesAnnotations[key].push({'key1': 'geschaeftszahl', 'value': 'my value ' + number}); // we just need this so the UI will update this.queuedFilesAnnotationsCount++; diff --git a/vendor/toolkit b/vendor/toolkit index e2996988724403d0423d37979f9786fe832700c1..e728b2a0094aaa18cecc3b081238f8e189871c35 160000 --- a/vendor/toolkit +++ b/vendor/toolkit @@ -1 +1 @@ -Subproject commit e2996988724403d0423d37979f9786fe832700c1 +Subproject commit e728b2a0094aaa18cecc3b081238f8e189871c35