From 18198f68d5b45f11728943c284cd46dd6843b367 Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Sun, 26 Jul 2020 20:16:50 +0200
Subject: [PATCH] Add link

---
 interface/web/sites/templates/web_vhost_domain_edit.htm | 6 ++++--
 interface/web/sites/web_vhost_domain_edit.php           | 2 +-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/interface/web/sites/templates/web_vhost_domain_edit.htm b/interface/web/sites/templates/web_vhost_domain_edit.htm
index af55ac96e3..8dec8d8e05 100644
--- a/interface/web/sites/templates/web_vhost_domain_edit.htm
+++ b/interface/web/sites/templates/web_vhost_domain_edit.htm
@@ -9,11 +9,13 @@
 
 
         {tmpl_hook name="begin_form"}
-            <tmpl_if name="vhostdomain_type" value="domain">
+    <tmpl_if name="vhostdomain_type" value="domain">
             <tmpl_if name="web_aliasdomains_info">
             Children:
             <ul>
-              <tmpl_loop name="web_aliasdomains_info"><li>{tmpl_var name='type'}: {tmpl_var name='domain'}</li></tmpl_loop>
+              <tmpl_loop name="web_aliasdomains_info">
+                <li>{tmpl_var name='type'}: <a href="#" data-load-content="sites/web_vhost_domain_edit.php?id={tmpl_var name='domain_id'}" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="link">{tmpl_var name='domain'}</a></li>
+              </tmpl_loop>
             </ul>
             <br />
             </tmpl_if>
diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php
index f8eb709972..31985b7992 100644
--- a/interface/web/sites/web_vhost_domain_edit.php
+++ b/interface/web/sites/web_vhost_domain_edit.php
@@ -960,7 +960,7 @@ class page_action extends tform_actions {
 	function onShowEdit() {
 		global $app;
 		if($app->tform->checkPerm($this->id, 'riud')) $app->tform->formDef['tabs']['domain']['readonly'] = false;
-		$sql = "SELECT domain, type FROM web_domain WHERE (type='alias' OR type='subdomain') AND parent_domain_id = ?";
+		$sql = "SELECT domain_id, domain, type FROM web_domain WHERE (type='alias' OR type='subdomain') AND parent_domain_id = ?";
 		$subs = $app->db->queryAllRecords($sql, $this->id);
 		$app->tpl->setLoop('web_aliasdomains_info', $subs);
 
-- 
GitLab