vor subdomain UX anpassung
This commit is contained in:
@@ -126,6 +126,7 @@ document.getElementById("serverDetailModal").style.display="none"
|
||||
window.openDomainCreate = function(){
|
||||
|
||||
document.getElementById("domainModalTitle").innerText = "Create Domain"
|
||||
document.getElementById("domainModalMeta").innerText = "Neue Domain anlegen"
|
||||
|
||||
document.getElementById("domain_id").value = ""
|
||||
document.getElementById("domain_name").value = ""
|
||||
@@ -133,8 +134,10 @@ window.openDomainCreate = function(){
|
||||
document.getElementById("domain_ip").value = ""
|
||||
document.getElementById("domain_cost").value = ""
|
||||
document.getElementById("domain_notes").value = ""
|
||||
document.getElementById("domainSaveBtn").innerText = "Create"
|
||||
|
||||
openModal("domainModal")
|
||||
document.getElementById("domain_name").focus()
|
||||
}
|
||||
|
||||
|
||||
@@ -142,6 +145,7 @@ window.openDomainCreate = function(){
|
||||
window.openDomainEdit = function(d){
|
||||
|
||||
document.getElementById("domainModalTitle").innerText="Edit Domain"
|
||||
document.getElementById("domainModalMeta").innerText=d.domain_name || ""
|
||||
|
||||
document.getElementById("domain_id").value=d.id
|
||||
|
||||
@@ -150,8 +154,10 @@ document.getElementById("domain_provider").value=d.provider || ""
|
||||
document.getElementById("domain_ip").value=d.ip_address || ""
|
||||
document.getElementById("domain_cost").value=d.yearly_cost || ""
|
||||
document.getElementById("domain_notes").value=d.notes || ""
|
||||
document.getElementById("domainSaveBtn").innerText = "Update"
|
||||
|
||||
document.getElementById("domainModal").style.display="block"
|
||||
document.getElementById("domain_name").focus()
|
||||
|
||||
}
|
||||
|
||||
@@ -166,17 +172,23 @@ window.closeDomainModal = function(){
|
||||
========================= */
|
||||
|
||||
window.openSubCreate = function(domainId){
|
||||
const domains = window.domainList || []
|
||||
const domain = domains.find(d => d.id == domainId)
|
||||
const domainName = domain?.domain_name || "Unbekannte Domain"
|
||||
|
||||
document.getElementById("sub_id").value = "" // RESET !!
|
||||
|
||||
document.getElementById("sub_domain_id").value = domainId
|
||||
document.getElementById("sub_name").value = ""
|
||||
document.getElementById("sub_ip").value = ""
|
||||
document.getElementById("sub_ip").value = domain?.ip_address || ""
|
||||
|
||||
document.querySelector("#subdomainModal h3").innerText = "Subdomain erstellen"
|
||||
document.getElementById("subdomainModalMeta").innerText = "Fuer " + domainName
|
||||
document.getElementById("subdomainSaveBtn").innerText = "Create"
|
||||
|
||||
|
||||
document.getElementById("subdomainModal").style.display="block"
|
||||
document.getElementById("sub_name").focus()
|
||||
|
||||
}
|
||||
|
||||
@@ -187,6 +199,7 @@ window.closeSubModal = function(){
|
||||
|
||||
|
||||
window.openSubEdit = function(s){
|
||||
const fullName = s.subdomain + "." + s.domain_name
|
||||
|
||||
document.getElementById("sub_id").value = s.id
|
||||
document.getElementById("sub_domain_id").value = s.domain_id
|
||||
@@ -195,8 +208,11 @@ document.getElementById("sub_name").value = s.subdomain
|
||||
document.getElementById("sub_ip").value = s.ip_address
|
||||
|
||||
document.querySelector("#subdomainModal h3").innerText = "Subdomain bearbeiten"
|
||||
document.getElementById("subdomainModalMeta").innerText = fullName
|
||||
document.getElementById("subdomainSaveBtn").innerText = "Update"
|
||||
|
||||
document.getElementById("subdomainModal").style.display="block"
|
||||
document.getElementById("sub_name").focus()
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user