From b94726392eb39dcad9c83d4732f717db90fe6f34 Mon Sep 17 00:00:00 2001 From: tbrehm Date: Thu, 5 Mar 2009 16:16:54 +0000 Subject: [PATCH] disable some fields in edit mode. --- interface/web/mail/mail_domain_edit.php | 7 ++ .../web/mail/templates/mail_domain_edit.htm | 98 +++++++++---------- .../web/sites/templates/web_domain_edit.htm | 2 +- interface/web/sites/web_domain_edit.php | 7 ++ 4 files changed, 64 insertions(+), 50 deletions(-) diff --git a/interface/web/mail/mail_domain_edit.php b/interface/web/mail/mail_domain_edit.php index bf22cdaf9..477e0b7b6 100644 --- a/interface/web/mail/mail_domain_edit.php +++ b/interface/web/mail/mail_domain_edit.php @@ -111,6 +111,13 @@ class page_action extends tform_actions { unset($policy_select); unset($tmp_user); + if($this->id > 0) { + //* we are editing a existing record + $app->tpl->setVar("edit_disabled", 'disabled="disabled"'); + } else { + $app->tpl->setVar("edit_disabled", ''); + } + parent::onShowEnd(); } diff --git a/interface/web/mail/templates/mail_domain_edit.htm b/interface/web/mail/templates/mail_domain_edit.htm index 64332fbc5..62174947e 100644 --- a/interface/web/mail/templates/mail_domain_edit.htm +++ b/interface/web/mail/templates/mail_domain_edit.htm @@ -1,49 +1,49 @@ -

- -
- -
-
Domain - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {tmpl_var name='active'} - -
- - - - -
- - -
-
- -
+

+ +
+ +
+
Domain + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {tmpl_var name='active'} + +
+ + + + +
+ + +
+
+ +
diff --git a/interface/web/sites/templates/web_domain_edit.htm b/interface/web/sites/templates/web_domain_edit.htm index 0a92965e7..e79557246 100644 --- a/interface/web/sites/templates/web_domain_edit.htm +++ b/interface/web/sites/templates/web_domain_edit.htm @@ -7,7 +7,7 @@ - + diff --git a/interface/web/sites/web_domain_edit.php b/interface/web/sites/web_domain_edit.php index 63854fa96..15c8fa81b 100644 --- a/interface/web/sites/web_domain_edit.php +++ b/interface/web/sites/web_domain_edit.php @@ -185,6 +185,13 @@ class page_action extends tform_actions { } + if($this->id > 0) { + //* we are editing a existing record + $app->tpl->setVar("edit_disabled", 'disabled="disabled"'); + } else { + $app->tpl->setVar("edit_disabled", ''); + } + parent::onShowEnd(); } -- GitLab