Răsfoiți Sursa

#108 - Related changes.

AntonLV 12 ani în urmă
părinte
comite
10f4a67fe7

+ 10 - 0
modules/base/general/classes/BxBaseModGeneralConfig.php

@@ -15,6 +15,7 @@ class BxBaseModGeneralConfig extends BxDolModuleConfig
 {
     public $CNF;
 
+    protected $_aObjects;
     protected $_aPrefixes;
     protected $_aJsClass;
     protected $_aJsObjects;
@@ -24,12 +25,21 @@ class BxBaseModGeneralConfig extends BxDolModuleConfig
     {
         parent::__construct($aModule);
 
+        $this->_aObjects = array();
         $this->_aPrefixes = array();
         $this->_aJsClass = array();
         $this->_aJsObjects = array();
         $this->_aGridObjects = array();
     }
 
+    public function getObject($sType = '')
+    {
+    	if(empty($sType))
+            return $this->_aObjects;
+
+        return isset($this->_aObjects[$sType]) ? $this->_aObjects[$sType] : '';
+    }
+
 	public function getPrefix($sType = '')
     {
     	if(empty($sType))

+ 0 - 8
modules/base/notifications/classes/BxBaseModNotificationsConfig.php

@@ -78,14 +78,6 @@ class BxBaseModNotificationsConfig extends BxBaseModGeneralConfig
             $this->_aHandlersHidden = explode(',', $sHideTimeline);
     }
 
-    public function getObject($sType = '')
-    {
-    	if(empty($sType))
-            return $this->_aObjects;
-
-        return isset($this->_aObjects[$sType]) ? $this->_aObjects[$sType] : '';
-    }
-
 	public function getHandlerDescriptor()
     {
     	return $this->_aHandlerDescriptor;

+ 9 - 2
template/scripts/BxBaseAccountForms.php

@@ -37,9 +37,16 @@ class BxBaseAccountForms extends BxDolProfileForms
             return MsgBox(_t('_sys_txt_error_occured'));
 
         $oForm->initChecker();
+        if (!$oForm->isSubmittedAndValid()) {
+        	$sCode = $oForm->getCode();
 
-        if (!$oForm->isSubmittedAndValid())
-            return $oForm->getCode();
+        	bx_alert('account', 'add_form', 0, 0, array(
+        		'form_object' => &$oForm,
+        		'form_code' => &$sCode
+        	));
+
+            return $sCode;
+        }
 
         // insert data into database
         $aValsToAdd = array (