From 01d6b4ed9174198f46b1d5df38ed068abbd10dee Mon Sep 17 00:00:00 2001
From: Herman van Rink <rink@initfour.nl>
Date: Tue, 1 Nov 2022 23:16:36 +0100
Subject: [PATCH] Add content name to page title for edit forms, #6401

---
 interface/web/dns/dns_soa_edit.php    | 10 ++++++++++
 interface/web/mail/mail_user_edit.php | 11 +++++++++++
 2 files changed, 21 insertions(+)

diff --git a/interface/web/dns/dns_soa_edit.php b/interface/web/dns/dns_soa_edit.php
index e17571e736..309a84236a 100644
--- a/interface/web/dns/dns_soa_edit.php
+++ b/interface/web/dns/dns_soa_edit.php
@@ -79,6 +79,16 @@ class page_action extends tform_actions {
 		parent::onShowNew();
 	}
 
+	function onShowEdit() {
+		global $app, $conf;
+
+		parent::onShowEdit();
+
+		if(isset($this->dataRecord)) {
+			$app->tform->formDef['title'] = $app->lng('DNS Zone') . ' ' . $this->dataRecord['origin'];
+		}
+	}
+
 	function onShowEnd() {
 		global $app, $conf;
 
diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php
index d8730fa2eb..1c2bc47313 100644
--- a/interface/web/mail/mail_user_edit.php
+++ b/interface/web/mail/mail_user_edit.php
@@ -67,6 +67,17 @@ class page_action extends tform_actions {
 		parent::onShowNew();
 	}
 
+	function onShowEdit() {
+		global $app, $conf;
+
+		parent::onShowEdit();
+
+		if(isset($this->dataRecord)) {
+			$app->tform->formDef['title'] = $app->lng('Mailbox') . ' ' . $this->dataRecord['email'];
+		}
+	}
+
+
 	function onShowEnd() {
 		global $app, $conf;
 
-- 
GitLab