From 216ea12666892397cd145cdef3c40d37b3df22a7 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Wed, 16 Dec 2015 11:03:28 -0500
Subject: [PATCH] - Changed template events (reduced php code and needed template code)

---
 interface/lib/classes/tform_base.inc.php |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/interface/lib/classes/tform_base.inc.php b/interface/lib/classes/tform_base.inc.php
index 4cc98a4..2e53d27 100644
--- a/interface/lib/classes/tform_base.inc.php
+++ b/interface/lib/classes/tform_base.inc.php
@@ -126,8 +126,8 @@
 	function loadFormDef($file, $module = '') {
 		global $app, $conf;
 
-		$app->plugin->raiseEvent('on_before_formdef', $this);
 		include $file;
+		$app->plugin->raiseEvent($_SESSION['s']['module']['name'].':'.$form['name'] . ':on_before_formdef', $this);
 		$this->formDef = $form;
 
 		$this->module = $module;
@@ -152,9 +152,9 @@
 		}
 		if(isset($wb_global)) unset($wb_global);
 		
-		$app->plugin->raiseEvent('on_after_formdef', $this);
-
 		$this->wordbook = $wb;
+		
+		$app->plugin->raiseEvent($_SESSION['s']['module']['name'].':'.$app->tform->formDef['name'] . ':on_after_formdef', $this);
 
 		$this->dateformat = $app->lng('conf_format_dateshort');
 		$this->datetimeformat = $app->lng('conf_format_datetime');

--
Gitblit v1.9.1