diff --git a/client_domain_add_modal.php b/client_domain_add_modal.php
index ab69e055..41caf7e4 100644
--- a/client_domain_add_modal.php
+++ b/client_domain_add_modal.php
@@ -73,7 +73,13 @@
+
+
+
+
+
+
@@ -65,10 +65,15 @@
-
+
+
+
+
+
+
@@ -99,7 +104,7 @@
-
+
@@ -109,7 +114,7 @@
-
+
@@ -119,7 +124,7 @@
-
+
diff --git a/js/domain_edit_modal.js b/js/domain_edit_modal.js
index 41977a03..c045869c 100644
--- a/js/domain_edit_modal.js
+++ b/js/domain_edit_modal.js
@@ -14,20 +14,21 @@ function populateDomainEditModal(client_id, domain_id) {
const vendors = response.vendors;
// Populate the domain modal fields
- document.getElementById("editHeader").innerText = domain.domain_name;
+ document.getElementById("editDomainHeader").innerText = domain.domain_name;
document.getElementById("editDomainId").value = domain_id;
document.getElementById("editDomainName").value = domain.domain_name;
- document.getElementById("editExpire").value = domain.domain_expire;
+ document.getElementById("editDomainExpire").value = domain.domain_expire;
+ document.getElementById("editDomainNotes").value = domain.domain_notes;
document.getElementById("editDomainIP").value = domain.domain_ip;
- document.getElementById("editNameServers").value = domain.domain_name_servers;
- document.getElementById("editMailServers").value = domain.domain_mail_servers;
- document.getElementById("editTxtRecords").value = domain.domain_txt;
- document.getElementById("editRawWhois").value = domain.domain_raw_whois;
+ document.getElementById("editDomainNameServers").value = domain.domain_name_servers;
+ document.getElementById("editDomainMailServers").value = domain.domain_mail_servers;
+ document.getElementById("editDomainTxtRecords").value = domain.domain_txt;
+ document.getElementById("editDomainRawWhois").value = domain.domain_raw_whois;
/* DROPDOWNS */
// Registrar dropdown
- var registrarDropdown = document.getElementById("editRegistrarId");
+ var registrarDropdown = document.getElementById("editDomainRegistrarId");
// Clear registrar dropdown
var i, L = registrarDropdown.options.length -1;
@@ -48,7 +49,7 @@ function populateDomainEditModal(client_id, domain_id) {
});
// Webhost dropdown
- var webhostDropdown = document.getElementById("editWebhostId");
+ var webhostDropdown = document.getElementById("editDomainWebhostId");
// Clear registrar dropdown
var i, L = webhostDropdown.options.length -1;
diff --git a/post/domain.php b/post/domain.php
index 6fcd249a..41cf1a92 100644
--- a/post/domain.php
+++ b/post/domain.php
@@ -14,6 +14,8 @@ if (isset($_POST['add_domain'])) {
$webhost = intval($_POST['webhost']);
$extended_log_description = '';
$expire = sanitizeInput($_POST['expire']);
+ $notes = sanitizeInput($_POST['notes']);
+
if (empty($expire)) {
$expire = "NULL";
} else {
@@ -35,7 +37,7 @@ if (isset($_POST['add_domain'])) {
$whois = sanitizeInput($records['whois']);
// Add domain record
- mysqli_query($mysqli,"INSERT INTO domains SET domain_name = '$name', domain_registrar = $registrar, domain_webhost = $webhost, domain_expire = $expire, domain_ip = '$a', domain_name_servers = '$ns', domain_mail_servers = '$mx', domain_txt = '$txt', domain_raw_whois = '$whois', domain_client_id = $client_id");
+ mysqli_query($mysqli,"INSERT INTO domains SET domain_name = '$name', domain_registrar = $registrar, domain_webhost = $webhost, domain_expire = $expire, domain_ip = '$a', domain_name_servers = '$ns', domain_mail_servers = '$mx', domain_txt = '$txt', domain_raw_whois = '$whois', domain_notes = '$notes', domain_client_id = $client_id");
// Get inserted ID (for linking certificate, if exists)
@@ -70,6 +72,7 @@ if (isset($_POST['edit_domain'])) {
$registrar = intval($_POST['registrar']);
$webhost = intval($_POST['webhost']);
$expire = sanitizeInput($_POST['expire']);
+ $notes = sanitizeInput($_POST['notes']);
if (empty($expire) || (new DateTime($expire)) < (new DateTime())) {
// Update domain expiry date
@@ -86,7 +89,7 @@ if (isset($_POST['edit_domain'])) {
$txt = sanitizeInput($records['txt']);
$whois = sanitizeInput($records['whois']);
- mysqli_query($mysqli,"UPDATE domains SET domain_name = '$name', domain_registrar = $registrar, domain_webhost = $webhost, domain_expire = '$expire', domain_ip = '$a', domain_name_servers = '$ns', domain_mail_servers = '$mx', domain_txt = '$txt', domain_raw_whois = '$whois' WHERE domain_id = $domain_id");
+ mysqli_query($mysqli,"UPDATE domains SET domain_name = '$name', domain_registrar = $registrar, domain_webhost = $webhost, domain_expire = '$expire', domain_ip = '$a', domain_name_servers = '$ns', domain_mail_servers = '$mx', domain_txt = '$txt', domain_raw_whois = '$whois', domain_notes = '$notes' WHERE domain_id = $domain_id");
//Logging
mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Domain', log_action = 'Modify', log_description = '$session_name modified domain $name', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_client_id = $client_id, log_user_id = $session_user_id, log_entity_id = $domain_id");