Skip to content
Snippets Groups Projects
Unverified Commit 290345d5 authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire:
Browse files

Use dbp-organization-select as key2 (#37)

parent 01563b74
No related branches found
No related tags found
No related merge requests found
Pipeline #18195 passed with warnings
......@@ -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"
......
......@@ -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++;
......
Subproject commit e2996988724403d0423d37979f9786fe832700c1
Subproject commit e728b2a0094aaa18cecc3b081238f8e189871c35
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment