Browse Source

Necessary alerts.

AntonLV 7 years ago
parent
commit
81e85f61fb
2 changed files with 19 additions and 4 deletions
  1. 4 0
      template/scripts/BxBaseAccountForms.php
  2. 15 4
      template/scripts/BxBaseFormView.php

+ 4 - 0
template/scripts/BxBaseAccountForms.php

@@ -52,6 +52,10 @@ class BxBaseAccountForms extends BxDolProfileForms
         $oForm->aFormAttrs['action'] = !empty($aParams['action']) ? $aParams['action'] : BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=create-account');
         $oForm->initChecker(self::$PROFILE_FIELDS);
 
+        bx_alert('account', 'add_form_check', 0, 0, array(
+            'form_object' => &$oForm
+        ));
+
         if (!$oForm->isSubmittedAndValid()) {
         	$sCode = $oForm->getCode();
 

+ 15 - 4
template/scripts/BxBaseFormView.php

@@ -140,16 +140,27 @@ class BxBaseFormView extends BxDolForm
      */
     function getCode($bDynamicMode = false)
     {
-        if (!$bDynamicMode && bx_is_dynamic_request())
+        if(!$bDynamicMode && bx_is_dynamic_request())
             $bDynamicMode = true;
 
         $this->_bDynamicMode = $bDynamicMode;
         $this->aFormAttrs = $this->_replaceMarkers($this->aFormAttrs);
-        $this->sCode = $this->genForm();
 
-        $this->addCssJs ();
+        $sInclude = '';
+        $this->sCode = false;
+        bx_alert('system', 'form_output', 0, 0, array(
+            'dynamic' => $this->_bDynamicMode,
+            'object' => &$this,
+            'code' => &$this->sCode,
+            'include' => &$sInclude
+        ));
+
+        if($this->sCode === false)
+            $this->sCode = $this->genForm();
+
+        $this->addCssJs();
         $sDynamicCssJs = $this->_processCssJs();
-        return $sDynamicCssJs . $this->sCode;
+        return $sInclude . $sDynamicCssJs . $this->sCode;
     }
 
     /**