From 7483ea1d495381b528e1c8516d156ab9d9599318 Mon Sep 17 00:00:00 2001 From: Dario Ernst Date: Mon, 12 Oct 2020 20:30:26 +0200 Subject: [PATCH] Make setup show external DB parameters automaticaly when selecting postgres Before, the "external postgres" options were not shown, even though "extrnal" was pre-selected. This fixes the mechanics surrounding the picker. --- setup/static/render.js | 7 ++++++- setup/templates/steps/database.html | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/setup/static/render.js b/setup/static/render.js index e501fffb..a817c4f0 100644 --- a/setup/static/render.js +++ b/setup/static/render.js @@ -51,7 +51,12 @@ $(document).ready(function() { } else if (this.value == 'postgresql') { $("#postgres_db").show(); $("#external_db").hide(); - $("#external_db").prop('checked', false); + $("#external_psql").prop('checked', true); + $("#external_db").show(); + $("#db_user").prop('required',true); + $("#db_pw").prop('required',true); + $("#db_url").prop('required',true); + $("#db_name").prop('required',true); } else if (this.value == 'mysql') { $("#postgres_db").hide(); $("#external_db").show(); diff --git a/setup/templates/steps/database.html b/setup/templates/steps/database.html index 194de577..ad5411ab 100644 --- a/setup/templates/steps/database.html +++ b/setup/templates/steps/database.html @@ -20,7 +20,7 @@
- +