From 46b6992b52a24ea5ef3f2370f1a9a9afff8556d0 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Wed, 15 May 2024 17:44:30 +0200 Subject: [PATCH] pre-fill the domain Signed-off-by: Simon L --- php/public/domain-prefill.js | 7 +++++++ php/templates/containers.twig | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 php/public/domain-prefill.js diff --git a/php/public/domain-prefill.js b/php/public/domain-prefill.js new file mode 100644 index 00000000..c81f2231 --- /dev/null +++ b/php/public/domain-prefill.js @@ -0,0 +1,7 @@ +document.addEventListener("DOMContentLoaded", function(event) { + // domain + let domain = document.getElementById("domain_input"); + if (domain) { + domain.value = window.location.host + } +}); diff --git a/php/templates/containers.twig b/php/templates/containers.twig index 4249cb2e..a885646f 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -20,6 +20,9 @@ {# Add 2nd tab warning #} + + {# Add domain-prefill #} + {% set isAnyRunning = false %} {% set isAnyRestarting = false %} @@ -100,7 +103,7 @@ Please note: The domain validation is disabled so any domain will be accepted here! So make sure that you do not make a typo here as you will not be able to change it afterwards!

{% endif %}
- +