From b94726392eb39dcad9c83d4732f717db90fe6f34 Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Thu, 05 Mar 2009 11:16:54 -0500 Subject: [PATCH] disable some fields in edit mode. --- interface/lib/classes/tform_actions.inc.php | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/interface/lib/classes/tform_actions.inc.php b/interface/lib/classes/tform_actions.inc.php index 95b9fbf..1abc316 100644 --- a/interface/lib/classes/tform_actions.inc.php +++ b/interface/lib/classes/tform_actions.inc.php @@ -30,11 +30,11 @@ class tform_actions { - var $id; - var $activeTab; - var $dataRecord; - var $plugins = array(); - var $oldDataRecord; // This array is only filled during updates and when db_history is enabled. + public $id; + public $activeTab; + public $dataRecord; + public $plugins = array(); + public $oldDataRecord; // This array is only filled during updates and when db_history is enabled. function onLoad() { global $app, $conf, $tform_def_file; @@ -80,9 +80,11 @@ // Calling the action functions if($this->id > 0) { - $this->onUpdate(); + $app->tform->action == 'EDIT'; + $this->onUpdate(); } else { - $this->onInsert(); + $app->tform->action == 'NEW'; + $this->onInsert(); } } -- Gitblit v1.9.1