mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-03-04 01:38:41 +08:00
pre-fill the domain
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
9347144a19
commit
46b6992b52
2 changed files with 11 additions and 1 deletions
7
php/public/domain-prefill.js
Normal file
7
php/public/domain-prefill.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
document.addEventListener("DOMContentLoaded", function(event) {
|
||||
// domain
|
||||
let domain = document.getElementById("domain_input");
|
||||
if (domain) {
|
||||
domain.value = window.location.host
|
||||
}
|
||||
});
|
|
@ -20,6 +20,9 @@
|
|||
|
||||
{# Add 2nd tab warning #}
|
||||
<script type="text/javascript" src="second-tab-warning.js"></script>
|
||||
|
||||
{# Add domain-prefill #}
|
||||
<script type="text/javascript" src="domain-prefill.js"></script>
|
||||
|
||||
{% set isAnyRunning = false %}
|
||||
{% set isAnyRestarting = false %}
|
||||
|
@ -100,7 +103,7 @@
|
|||
<b>Please note:</b> 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!<br><br>
|
||||
{% endif %}
|
||||
<form method="POST" action="/api/configuration" class="xhr">
|
||||
<input type="text" name="domain" value="{{ domain }}" placeholder="nextcloud.yourdomain.com"/>
|
||||
<input type="text" id="domain_input" name="domain" value="{{ domain }}" placeholder="nextcloud.yourdomain.com"/>
|
||||
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
|
||||
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
|
||||
<input class="button" type="submit" value="Submit domain" />
|
||||
|
|
Loading…
Reference in a new issue