diff --git a/src/public/app/widgets/type_widgets/options/other/attachment_erasure_timeout.ts b/src/public/app/widgets/type_widgets/options/other/attachment_erasure_timeout.ts index 01c730287..7af216cd0 100644 --- a/src/public/app/widgets/type_widgets/options/other/attachment_erasure_timeout.ts +++ b/src/public/app/widgets/type_widgets/options/other/attachment_erasure_timeout.ts @@ -9,9 +9,7 @@ const TPL = `
${t("attachment_erasure_timeout.attachment_auto_deletion_description")}
-`; - -const TPL2 = ` +${t("attachment_erasure_timeout.manual_erasing_description")}
@@ -31,7 +29,10 @@ export default class AttachmentErasureTimeoutOptions extends TimeSelector { } doRender() { - this.$widget = $(TPL).append(this.$widget).append(TPL2); + const $timeSelector = this.$widget; + this.$widget = $(TPL); + // inject TimeSelector widget template + this.$widget.find("#time-selector-placeholder").replaceWith($timeSelector); this.$eraseUnusedAttachmentsNowButton = this.$widget.find(".erase-unused-attachments-now-button"); this.$eraseUnusedAttachmentsNowButton.on("click", () => { diff --git a/src/public/app/widgets/type_widgets/options/other/note_erasure_timeout.ts b/src/public/app/widgets/type_widgets/options/other/note_erasure_timeout.ts index d71a2c370..b15e56074 100644 --- a/src/public/app/widgets/type_widgets/options/other/note_erasure_timeout.ts +++ b/src/public/app/widgets/type_widgets/options/other/note_erasure_timeout.ts @@ -9,9 +9,7 @@ const TPL = ` `; @@ -30,7 +28,10 @@ export default class NoteErasureTimeoutOptions extends TimeSelector { } doRender() { - this.$widget = $(TPL).append(this.$widget).append(TPL2); + const $timeSelector = this.$widget; + // inject TimeSelector widget template + this.$widget = $(TPL); + this.$widget.find("#time-selector-placeholder").replaceWith($timeSelector) this.$eraseDeletedNotesButton = this.$widget.find("#erase-deleted-notes-now-button");