From 3669b3c10e2ead466165be34fa28078e59703567 Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Fri, 24 Jan 2014 06:29:11 -0500
Subject: [PATCH] Merged subdomain and aliasdomain files to childdomain

---
 interface/web/sites/templates/web_childdomain_edit.htm |   50 +++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 39 insertions(+), 11 deletions(-)

diff --git a/interface/web/sites/templates/web_aliasdomain_edit.htm b/interface/web/sites/templates/web_childdomain_edit.htm
similarity index 78%
rename from interface/web/sites/templates/web_aliasdomain_edit.htm
rename to interface/web/sites/templates/web_childdomain_edit.htm
index 66c2c40..b0e0ebd 100644
--- a/interface/web/sites/templates/web_aliasdomain_edit.htm
+++ b/interface/web/sites/templates/web_childdomain_edit.htm
@@ -1,26 +1,53 @@
 <h2><tmpl_var name="list_head_txt"></h2>
 <p><tmpl_var name="list_desc_txt"></p>
 
-<div class="panel panel_web_domain">
+<div class="panel panel_web_childdomain">
 
     <div class="pnl_formsarea">
         <fieldset class="inlineLabels">
+			<tmpl_if name="childdomain_type" value="subdomain">
+            <tmpl_if name="domain_option">
             <div class="ctrlHolder">
-                <label for="domain">{tmpl_var name='domain_txt'}</label>
+                <label for="parent_domain_id">{tmpl_var name='parent_domain_id_txt'}</label>
+                <select id="parent_domain_id" name="parent_domain_id" class="selectInput formLengthHalf">{tmpl_var name='parent_domain_id'}</select>
+            </div>
+            </tmpl_if>
+            <div class="ctrlHolder">
+                <label for="domain">{tmpl_var name='host_txt'}</label>
+                <input name="domain" id="domain" value="{tmpl_var name='domain'}" size="30" maxlength="255" type="text" class="textInput formLengthHalf" />
+            </div>
+            <tmpl_if name="domain_option">
+            <div class="ctrlHolder">
+                <label for="sel_domain">{tmpl_var name='domain_txt'}</label>
+                    <select name="sel_domain" id="sel_domain" class="selectInput">
+                        {tmpl_var name='domain_option'}
+                    </select>
+            </div>
+            <tmpl_else>
+            <div class="ctrlHolder">
+                <label for="parent_domain_id">{tmpl_var name='domain_txt'}</label>
+                <select id="parent_domain_id" name="parent_domain_id" class="selectInput formLengthHalf">{tmpl_var name='parent_domain_id'}</select>
+            </div>
+            </tmpl_if>
+			<tmpl_else>
+            <div class="ctrlHolder">
                 <tmpl_if name="domain_option">
+                    <label for="domain">{tmpl_var name='domain_txt'}</label>
                     <select name="domain" id="domain" class="selectInput">
                         {tmpl_var name='domain_option'}
                     </select>
-                    <tmpl_else>
-                        <input name="domain" id="domain" value="{tmpl_var name='domain'}" size="30" maxlength="255" type="text" class="textInput" />
+                <tmpl_else>
+                    <label for="domain">{tmpl_var name='domain_txt'}</label>
+                    <input name="domain" id="domain" value="{tmpl_var name='domain'}" size="30" maxlength="255" type="text" class="textInput" />
                 </tmpl_if>
             </div>
             <div class="ctrlHolder">
                 <label for="parent_domain_id">{tmpl_var name='parent_domain_id_txt'}</label>
-                <select name="parent_domain_id" id="parent_domain_id" class="selectInput">
+                <select id="parent_domain_id" name="parent_domain_id" class="selectInput">
                     {tmpl_var name='parent_domain_id'}
                 </select>
             </div>
+			</tmpl_if>
             <div class="ctrlHolder">
                 <label for="redirect_type">{tmpl_var name='redirect_type_txt'}</label>
                 <select name="redirect_type" id="redirect_type" class="selectInput formLengthHalf">
@@ -31,6 +58,7 @@
                 <label for="redirect_path">{tmpl_var name='redirect_path_txt'}</label>
                 <input name="redirect_path" id="redirect_path" value="{tmpl_var name='redirect_path'}" size="30" maxlength="255" type="text" class="textInput" />
             </div>
+			<tmpl_if name="childdomain_type" value="aliasdomain">
             <div class="ctrlHolder">
                 <label for="subdomain">{tmpl_var name='subdomain_txt'}</label>
                 <select name="subdomain" id="subdomain" class="selectInput formLengthHalf">
@@ -43,6 +71,7 @@
                     {tmpl_var name='seo_redirect'}
                 </select>
             </div>
+			</tmpl_if>
             <div class="ctrlHolder">
                 <p class="label">{tmpl_var name='active_txt'}</p>
                 <div class="multiField">
@@ -54,17 +83,17 @@
         <input type="hidden" name="id" value="{tmpl_var name='id'}">
 
         <div class="buttonHolder buttons">
-            <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','sites/web_aliasdomain_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
-            <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('sites/web_aliasdomain_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
+            <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','sites/web_childdomain_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
+            <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('sites/web_childdomain_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
         </div>
     </div>
-
+  
 </div>
 <script language="JavaScript" type="text/javascript">
     var webId = jQuery('#parent_domain_id').val();
     var serverId;
     getServerId(webId);
-		
+	
     jQuery('#parent_domain_id').change(function(){
         webId = $(this).val();
         getServerId(webId);
@@ -82,7 +111,7 @@
             jQuery('.tabbox_tabs ul li:last').hide();
         }
     });
-		
+	
     function getServerId(webId){
         jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {web_id : webId, type : "getserverid"}, function(data) {
             serverId = data.serverid;
@@ -144,5 +173,4 @@
             }
         });
     }
-			
 </script>
\ No newline at end of file

--
Gitblit v1.9.1