From d5498fcec7394d2b89667832853e239d5f496e1c Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 23 Aug 2020 21:51:00 +0200 Subject: Add localized texts to Benki post model. Change-Id: I123cfe2ff06f85dc14c705b21d723d1c68fd2e00 --- .../META-INF/resources/bookmarks/MlkBookmarkSubmissionForm.js | 6 ++++-- .../META-INF/resources/lazychat/MlkLazychatSubmissionForm.js | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src/main/resources/META-INF') diff --git a/src/main/resources/META-INF/resources/bookmarks/MlkBookmarkSubmissionForm.js b/src/main/resources/META-INF/resources/bookmarks/MlkBookmarkSubmissionForm.js index 6ecc355..b4d21d3 100644 --- a/src/main/resources/META-INF/resources/bookmarks/MlkBookmarkSubmissionForm.js +++ b/src/main/resources/META-INF/resources/bookmarks/MlkBookmarkSubmissionForm.js @@ -173,9 +173,11 @@ export class MlkBookmarkSubmissionForm extends HTMLElement { let post = await r.json(); this.uriInput.value = post.uri; - this.titleInput.value = post.title; - this.descriptionInput.innerText = post.description; this.visibilityInput.value = post.visibility; + if (post.texts['']) { + this.titleInput.value = post.texts[''].title; + this.descriptionInput.innerText = post.texts[''].description; + } this.loaded = true; } diff --git a/src/main/resources/META-INF/resources/lazychat/MlkLazychatSubmissionForm.js b/src/main/resources/META-INF/resources/lazychat/MlkLazychatSubmissionForm.js index c6334ad..3688527 100644 --- a/src/main/resources/META-INF/resources/lazychat/MlkLazychatSubmissionForm.js +++ b/src/main/resources/META-INF/resources/lazychat/MlkLazychatSubmissionForm.js @@ -107,8 +107,10 @@ export class MlkLazychatSubmissionForm extends HTMLElement { } let post = await r.json(); - this.textInput.value = post.content; this.visibilityInput.value = post.visibility; + if (post.texts['']) { + this.textInput.value = post.texts[''].content; + } this.loaded = true; } -- cgit v1.2.3