From 500ce91da8aacdbc393a788eea2d4446e2b93e8a Mon Sep 17 00:00:00 2001 From: Samuel Zielke Date: Thu, 10 Oct 2024 14:30:11 +0200 Subject: [PATCH] BugFix: Settings/Studys - Color of input field and fill out by loading site with DB --- app/static/app/js/home.js | 8 ++++++++ app/templates/app/base.html | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/static/app/js/home.js b/app/static/app/js/home.js index 808cfe7..ed2c2a7 100644 --- a/app/static/app/js/home.js +++ b/app/static/app/js/home.js @@ -153,6 +153,14 @@ async function getActualDataAndFillView() { document.getElementById('yearRest').innerText = 600 - parseInt(yearData) document.getElementById('prBarYear').style.width = `${Math.round((100/600)*parseInt(yearData))}%` + // Settings vor ausfüllen + + // DATEN VON SETTINGS ABFRAGEN + getAllEntries('settings') + .then(function(result) { + document.getElementById('studysinput').value = parseInt(result.find(element => element.SettingsID === 1).SettingsValue) + }); + } catch (error) { console.error('Fehler bei der Initialisierung oder Filterung:', error); } diff --git a/app/templates/app/base.html b/app/templates/app/base.html index 9979acc..7a6fed6 100644 --- a/app/templates/app/base.html +++ b/app/templates/app/base.html @@ -31,11 +31,11 @@
-
Einstellungen
+

Einstellungen

  • Bibelstudien: - +