Alex Trofimov 12 лет назад
Родитель
Сommit
acbdfd1af5

+ 1 - 13
inc/js/functions.js

@@ -294,19 +294,7 @@ function bx_menu_popup_inline (jSel, e, options) {
 }
 }
 
 
 function validateLoginForm(eForm) {
 function validateLoginForm(eForm) {
-    if (!eForm)
-        return false;
-
-    $(eForm).ajaxSubmit({
-        success: function(sResponce) {
-            if(sResponce == 'OK')
-                eForm.submit();
-            else
-                alert(sResponce);
-        }
-    });
-
-    return false;
+    return true;
 }
 }
 
 
 /**
 /**

+ 16 - 15
inc/profiles.inc.php

@@ -170,7 +170,22 @@ function bx_check_password($sLogin, $sPassword, $iRole = BX_DOL_ROLE_MEMBER) {
 
 
     $sPassCheck = encryptUserPwd($sPassword, $aAccountInfo['salt']);
     $sPassCheck = encryptUserPwd($sPassword, $aAccountInfo['salt']);
 
 
-    return bx_check_login($aAccountInfo['id'], $sPassCheck, $iRole);
+    if ($sErrorMsg = bx_check_login($aAccountInfo['id'], $sPassCheck, $iRole))
+        return $sErrorMsg;
+
+    // Admin can always login even if his ip is blocked
+    if (isAdmin($aAccountInfo['id']))
+        return '';
+
+    // If account is banned
+    if (isLoggedBanned($aAccountInfo['id'])) {
+        bx_import('BxDolLanguages');
+        return _t('_member_banned');
+    }
+
+    $sErrorMsg = '';
+    bx_alert('account', 'check_login',  $aAccountInfo['id'], false, array('error_msg' => &$sErrorMsg));
+    return $sErrorMsg;
 }
 }
 
 
 
 
@@ -203,20 +218,6 @@ function bx_check_login($iID, $sPassword, $iRole = BX_DOL_ROLE_MEMBER) {
         return _t("_sys_txt_login_invalid_role");
         return _t("_sys_txt_login_invalid_role");
     }
     }
 
 
-    // Admin can always login even if his ip is blocked
-    if (isAdmin($aAccountInfo['id']))
-        return '';
-
-    // Check if IP is banned
-    if (BxDolRequest::serviceExists('bx_antispam', 'check_login') && ($sErrorMsg = BxDolService::call('bx_antispam', 'check_login')))
-        return $sErrorMsg;
-
-    // If account is banned
-    if (isLoggedBanned($aAccountInfo['id'])) {
-        bx_import('BxDolLanguages');
-        return _t('_member_banned');
-    }
-
     return '';
     return '';
 }
 }
 
 

+ 4 - 3
install/patterns/header.inc.php

@@ -133,13 +133,14 @@ mb_regex_encoding('UTF-8');
 // include files necessary for basic functionality
 // include files necessary for basic functionality
 require_once(BX_DIRECTORY_PATH_CLASSES . "BxDol.php");
 require_once(BX_DIRECTORY_PATH_CLASSES . "BxDol.php");
 require_once(BX_DIRECTORY_PATH_INC . "utils.inc.php");
 require_once(BX_DIRECTORY_PATH_INC . "utils.inc.php");
-require_once(BX_DIRECTORY_PATH_INC . "security.inc.php");
-require_once(BX_DIRECTORY_PATH_INC . "db.inc.php");
-require_once(BX_DIRECTORY_PATH_INC . "profiles.inc.php");
 
 
 bx_import('BxDolConfig');
 bx_import('BxDolConfig');
 bx_import('BxDolService');
 bx_import('BxDolService');
 bx_import('BxDolAlerts');
 bx_import('BxDolAlerts');
 
 
+require_once(BX_DIRECTORY_PATH_INC . "security.inc.php");
+require_once(BX_DIRECTORY_PATH_INC . "db.inc.php");
+require_once(BX_DIRECTORY_PATH_INC . "profiles.inc.php");
+
 $o = new BxDolAlerts('system', 'begin', 0);
 $o = new BxDolAlerts('system', 'begin', 0);
 $o->alert();
 $o->alert();

+ 1 - 1
install/sql/system.sql

@@ -2219,7 +2219,7 @@ CREATE TABLE IF NOT EXISTS `sys_objects_form` (
 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
 ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
 
 
 INSERT INTO `sys_objects_form` (`object`, `module`, `title`, `action`, `form_attrs`, `submit_name`, `table`, `key`, `uri`, `uri_title`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
 INSERT INTO `sys_objects_form` (`object`, `module`, `title`, `action`, `form_attrs`, `submit_name`, `table`, `key`, `uri`, `uri_title`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
-('sys_login', 'system', '_sys_form_login', 'member.php', 'a:3:{s:2:"id";s:14:"sys-form-login";s:6:"action";s:10:"member.php";s:8:"onsubmit";s:38:"validateLoginForm(this); return false;";}', 'role', '', '', '', '', '', 0, 1, 'BxTemplFormLogin', ''),
+('sys_login', 'system', '_sys_form_login', 'member.php', 'a:3:{s:2:"id";s:14:"sys-form-login";s:6:"action";s:10:"member.php";s:8:"onsubmit";s:31:"return validateLoginForm(this);";}', 'role', '', '', '', '', '', 0, 1, 'BxTemplFormLogin', ''),
 ('sys_account', 'system', '_sys_form_account', '', '', 'do_submit', 'sys_accounts', 'id', '', '', 'a:1:{s:14:"checker_helper";s:26:"BxFormAccountCheckerHelper";}', 0, 1, 'BxTemplFormAccount', ''),
 ('sys_account', 'system', '_sys_form_account', '', '', 'do_submit', 'sys_accounts', 'id', '', '', 'a:1:{s:14:"checker_helper";s:26:"BxFormAccountCheckerHelper";}', 0, 1, 'BxTemplFormAccount', ''),
 ('sys_forgot_password', 'system', '_sys_form_forgot_password', '', '', 'do_submit', '', '', '', '', 'a:1:{s:14:"checker_helper";s:33:"BxFormForgotPasswordCheckerHelper";}', 0, 1, 'BxTemplFormForgotPassword', ''),
 ('sys_forgot_password', 'system', '_sys_form_forgot_password', '', '', 'do_submit', '', '', '', '', 'a:1:{s:14:"checker_helper";s:33:"BxFormForgotPasswordCheckerHelper";}', 0, 1, 'BxTemplFormForgotPassword', ''),
 ('sys_confirm_email', 'system', '_sys_form_confirm_email', '', '', 'do_submit', '', '', '', '', 'a:1:{s:14:"checker_helper";s:31:"BxFormConfirmEmailCheckerHelper";}', 0, 1, 'BxTemplFormConfirmEmail', ''),
 ('sys_confirm_email', 'system', '_sys_form_confirm_email', '', '', 'do_submit', '', '', '', '', 'a:1:{s:14:"checker_helper";s:31:"BxFormConfirmEmailCheckerHelper";}', 0, 1, 'BxTemplFormConfirmEmail', ''),

+ 33 - 0
modules/boonex/antispam/classes/BxAntispamAlertsResponse.php

@@ -0,0 +1,33 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
+ * CC-BY License - http://creativecommons.org/licenses/by/3.0/
+ *
+ * @defgroup    Antispam Antispam
+ * @ingroup     DolphinModules
+ *
+ * @{
+ */
+
+/**
+ * alerts handler
+ */
+class BxAntispamAlertsResponse extends BxDolAlertsResponse 
+{
+    public function response($oAlert) 
+    {
+        if ('account' != $oAlert->sUnit)
+            return;
+
+        switch ($oAlert->sAction) {
+            case 'check_login':
+                $oAlert->aExtras['error_msg'] = BxDolService::call('bx_antispam', 'check_login');
+                break;
+            case ''; // TODO: check join
+                break;
+        }
+        
+    }
+}
+
+/** @} */

+ 4 - 2
modules/boonex/antispam/classes/BxAntispamConfig.php

@@ -21,7 +21,8 @@ class BxAntispamConfig extends BxDolModuleConfig
         'antispam_report' => 'bx_antispam_report',
         'antispam_report' => 'bx_antispam_report',
         'dnsbl_enable' => 'bx_antispam_dnsbl_enable',
         'dnsbl_enable' => 'bx_antispam_dnsbl_enable',
         'uridnsbl_enable' => 'bx_antispam_uridnsbl_enable',
         'uridnsbl_enable' => 'bx_antispam_uridnsbl_enable',
-        'dnsbl_behaviour' => 'bx_antispam_dnsbl_behaviour',
+        'dnsbl_behaviour_login' => 'bx_antispam_dnsbl_behaviour_login',
+        'dnsbl_behaviour_join' => 'bx_antispam_dnsbl_behaviour_join',
         'akismet_enable' => 'bx_antispam_akismet_enable',
         'akismet_enable' => 'bx_antispam_akismet_enable',
     );
     );
     /**
     /**
@@ -32,7 +33,8 @@ class BxAntispamConfig extends BxDolModuleConfig
         'antispam_report' => '',
         'antispam_report' => '',
         'dnsbl_enable' => '',
         'dnsbl_enable' => '',
         'uridnsbl_enable' => '',
         'uridnsbl_enable' => '',
-        'dnsbl_behaviour' => 'approval',
+        'dnsbl_behaviour_login' => 'block',
+        'dnsbl_behaviour_join' => 'approval',
         'akismet_enable' => '',
         'akismet_enable' => '',
     );
     );
 
 

+ 7 - 0
modules/boonex/antispam/classes/BxAntispamGridBlockLog.php

@@ -24,6 +24,13 @@ class BxAntispamGridBlockLog extends BxTemplGrid
     {
     {
         return parent::_getCellDefault (long2ip($mixedValue), $sKey, $aField, $aRow);
         return parent::_getCellDefault (long2ip($mixedValue), $sKey, $aField, $aRow);
     }
     }
+    protected function _getCellMemberId ($mixedValue, $sKey, $aField, $aRow) 
+    {
+        $s = '<span class="bx-def-font-grayed">' . _t('_undefined') . '</span>';
+        if ($mixedValue)
+            $s = $mixedValue; // TODO: link to profile
+        return parent::_getCellDefault ($s, $sKey, $aField, $aRow);
+    }
     protected function _getCellType ($mixedValue, $sKey, $aField, $aRow) 
     protected function _getCellType ($mixedValue, $sKey, $aField, $aRow) 
     {
     {
         return parent::_getCellDefault (_t('_bx_antispam_type_' . $mixedValue), $sKey, $aField, $aRow);
         return parent::_getCellDefault (_t('_bx_antispam_type_' . $mixedValue), $sKey, $aField, $aRow);

+ 8 - 5
modules/boonex/antispam/classes/BxAntispamModule.php

@@ -125,10 +125,8 @@ class BxAntispamModule extends BxDolModule
         if (!$sErrorMsg && $this->serviceIsIpBlocked($sIp))
         if (!$sErrorMsg && $this->serviceIsIpBlocked($sIp))
             $sErrorMsg = $this->getErrorMessageIpBlocked();
             $sErrorMsg = $this->getErrorMessageIpBlocked();
 
 
-        if (!$sErrorMsg && 'on' == $this->_oConfig->getAntispamOption('dnsbl_enable') && 'block' == $this->_oConfig->getAntispamOption('dnsbl_behaviour') && $this->serviceIsIpDnsBlacklisted($sIp, $sType))
+        if (!$sErrorMsg && 'on' == $this->_oConfig->getAntispamOption('dnsbl_enable') && $this->serviceIsIpDnsBlacklisted($sIp, $sType) && 'block' == $this->_oConfig->getAntispamOption('dnsbl_behaviour_login'))
             $sErrorMsg = $this->getErrorMessageSpam();
             $sErrorMsg = $this->getErrorMessageSpam();
-        
-        bx_alert('bx_antispam', 'check_login', bx_get_logged_profile_id(), 0, array('ip' => $sIp, 'error_msg' => &$sErrorMsg));
 
 
         return $sErrorMsg;
         return $sErrorMsg;
     }
     }
@@ -147,6 +145,7 @@ class BxAntispamModule extends BxDolModule
      */
      */
     function serviceCheckJoin ($sEmail, $sIp = '') 
     function serviceCheckJoin ($sEmail, $sIp = '') 
     {
     {
+        $bApproval = false;
         $sErrorMsg = '';
         $sErrorMsg = '';
         $sType = 'join';
         $sType = 'join';
 
 
@@ -156,8 +155,12 @@ class BxAntispamModule extends BxDolModule
         if (!$sErrorMsg && $this->serviceIsIpBlocked($sIp))
         if (!$sErrorMsg && $this->serviceIsIpBlocked($sIp))
             $sErrorMsg = $this->getErrorMessageIpBlocked();
             $sErrorMsg = $this->getErrorMessageIpBlocked();
 
 
-        if (!$sErrorMsg && 'on' == $this->_oConfig->getAntispamOption('dnsbl_enable') && 'block' == $this->_oConfig->getAntispamOption('dnsbl_behaviour') && $this->serviceIsIpDnsBlacklisted($sIp, $sType))
-            $sErrorMsg = $this->getErrorMessageSpam();
+        if (!$sErrorMsg && 'on' == $this->_oConfig->getAntispamOption('dnsbl_enable') && $this->serviceIsIpDnsBlacklisted($sIp, $sType)) {
+            if ('approval' == $this->_oConfig->getAntispamOption('dnsbl_behaviour_join'))
+                $bApproval = true;
+            else
+                $sErrorMsg = $this->getErrorMessageSpam();
+        }
 
 
         
         
         if (!$sErrorMsg) {
         if (!$sErrorMsg) {

+ 2 - 1
modules/boonex/antispam/install/langs/en.xml

@@ -95,7 +95,8 @@ This antispam method scan submitted content for the URLs and check them if any o
 	<string name="_bx_antispam_option_report"><![CDATA[Send report to admin if spam content discovered]]></string>
 	<string name="_bx_antispam_option_report"><![CDATA[Send report to admin if spam content discovered]]></string>
 	<string name="_bx_antispam_option_ip_list_type"><![CDATA[IP table type (1 - all allowed except listed, 2 - all blocked except listed, 0 - disabled)]]></string>
 	<string name="_bx_antispam_option_ip_list_type"><![CDATA[IP table type (1 - all allowed except listed, 2 - all blocked except listed, 0 - disabled)]]></string>
 	<string name="_bx_antispam_option_dnsbl_enable"><![CDATA[Enable DNS Block Lists]]></string>
 	<string name="_bx_antispam_option_dnsbl_enable"><![CDATA[Enable DNS Block Lists]]></string>
-	<string name="_bx_antispam_option_dnsbl_behaviour"><![CDATA[User join behaviour if listed in DNS Block Lists]]></string>
+	<string name="_bx_antispam_option_dnsbl_behaviour_login"><![CDATA[User login behaviour if listed in DNS Block Lists]]></string>
+	<string name="_bx_antispam_option_dnsbl_behaviour_join"><![CDATA[User join behaviour if listed in DNS Block Lists]]></string>
 	<string name="_bx_antispam_option_uridnsbl_enable"><![CDATA[Enable URI DNS Block Lists]]></string>
 	<string name="_bx_antispam_option_uridnsbl_enable"><![CDATA[Enable URI DNS Block Lists]]></string>
 	<string name="_bx_antispam_option_akismet_enable"><![CDATA[Enable Akismet]]></string>
 	<string name="_bx_antispam_option_akismet_enable"><![CDATA[Enable Akismet]]></string>
 	<string name="_bx_antispam_option_akismet_api_key"><![CDATA[Akismet API Key]]></string>
 	<string name="_bx_antispam_option_akismet_api_key"><![CDATA[Akismet API Key]]></string>

+ 5 - 0
modules/boonex/antispam/install/sql/disable.sql

@@ -27,3 +27,8 @@ DELETE FROM `sys_form_inputs` WHERE `object`='bx_antispam_ip_table_form';
 DELETE FROM `sys_form_display_inputs` WHERE `display_name`='bx_antispam_ip_table_form_add';
 DELETE FROM `sys_form_display_inputs` WHERE `display_name`='bx_antispam_ip_table_form_add';
 DELETE FROM `sys_form_display_inputs` WHERE `display_name`='bx_antispam_ip_table_form_edit';
 DELETE FROM `sys_form_display_inputs` WHERE `display_name`='bx_antispam_ip_table_form_edit';
 
 
+-- alerts
+
+SET @iHandler := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_antispam' LIMIT 1);
+DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandler;
+DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandler;

+ 12 - 3
modules/boonex/antispam/install/sql/enable.sql

@@ -32,9 +32,10 @@ VALUES (@iTypeId, 'bx_antispam_dnsbl', '_bx_antispam_adm_stg_cpt_category_dnsbl'
 SET @iCategoryId = LAST_INSERT_ID();
 SET @iCategoryId = LAST_INSERT_ID();
 
 
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
-(@iCategoryId, 'bx_antispam_dnsbl_enable', '_bx_antispam_option_dnsbl_enable', '', 'checkbox', '', '', '', 10),
-(@iCategoryId, 'bx_antispam_dnsbl_behaviour', '_bx_antispam_option_dnsbl_behaviour', 'approval', 'select', 'block,approval', '', '', 20),
-(@iCategoryId, 'bx_antispam_uridnsbl_enable', '_bx_antispam_option_uridnsbl_enable', '', 'checkbox', '', '', '', 30);
+(@iCategoryId, 'bx_antispam_dnsbl_enable', '_bx_antispam_option_dnsbl_enable', 'on', 'checkbox', '', '', '', 10),
+(@iCategoryId, 'bx_antispam_dnsbl_behaviour_login', '_bx_antispam_option_dnsbl_behaviour_login', 'block', 'select', 'block,log', '', '', 20),
+(@iCategoryId, 'bx_antispam_dnsbl_behaviour_join', '_bx_antispam_option_dnsbl_behaviour_join', 'approval', 'select', 'block,approval', '', '', 30),
+(@iCategoryId, 'bx_antispam_uridnsbl_enable', '_bx_antispam_option_uridnsbl_enable', 'on', 'checkbox', '', '', '', 40);
 
 
 
 
 
 
@@ -181,4 +182,12 @@ INSERT INTO `sys_form_display_inputs`(`display_name`, `input_name`, `visible_for
 ('bx_antispam_ip_table_form_edit', 'close', 2147483647, 1, 7),
 ('bx_antispam_ip_table_form_edit', 'close', 2147483647, 1, 7),
 ('bx_antispam_ip_table_form_edit', 'buttons', 2147483647, 1, 8);
 ('bx_antispam_ip_table_form_edit', 'buttons', 2147483647, 1, 8);
 
 
+-- alerts
+
+INSERT INTO `sys_alerts_handlers` (`name`, `class`, `file`, `eval`) VALUES 
+('bx_antispam', 'BxAntispamAlertsResponse', 'modules/boonex/antispam/classes/BxAntispamAlertsResponse.php', '');
+SET @iHandler := LAST_INSERT_ID();
+
+INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
+('account', 'check_login', @iHandler);
 
 

+ 1 - 1
modules/boonex/contact/classes/BxContactModule.php

@@ -96,7 +96,7 @@ class BxContactModule extends BxDolModule
         //    return false;
         //    return false;
 
 
         bx_import('BxDolPermalinks');
         bx_import('BxDolPermalinks');
-        return BxDolPermalinks::getInstance()->permalink('page.php?i=contact');
+        return BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=contact');
     }
     }
 
 
     /*
     /*

+ 19 - 22
template/scripts/BxBaseFormLogin.php

@@ -12,37 +12,30 @@ bx_import('BxTemplFormView');
 /**
 /**
  * Login Form.
  * Login Form.
  */
  */
-class BxBaseFormLogin extends BxTemplFormView {
-
-    protected $_sLoginError = false;
+class BxBaseFormLogin extends BxTemplFormView 
+{
     protected $_iRole = BX_DOL_ROLE_MEMBER;
     protected $_iRole = BX_DOL_ROLE_MEMBER;
 
 
-    public function __construct($aInfo, $oTemplate) {
+    public function __construct($aInfo, $oTemplate) 
+    {
         parent::__construct($aInfo, $oTemplate);
         parent::__construct($aInfo, $oTemplate);
 
 
         $sRelocate = bx_process_input(bx_get('relocate'));
         $sRelocate = bx_process_input(bx_get('relocate'));
         $this->aInputs['relocate']['value'] = $sRelocate && 0 == strncmp(BX_DOL_URL_ROOT, $sRelocate, strlen(BX_DOL_URL_ROOT)) ? $sRelocate : BX_DOL_URL_ROOT . 'member.php';
         $this->aInputs['relocate']['value'] = $sRelocate && 0 == strncmp(BX_DOL_URL_ROOT, $sRelocate, strlen(BX_DOL_URL_ROOT)) ? $sRelocate : BX_DOL_URL_ROOT . 'member.php';
     }
     }
 
 
-    function isValid () {
-        if (!parent::isValid ()) {
-            $this->_setLoginError (_t('_sys_txt_login_error'));
+    function isValid () 
+    {
+        if (!parent::isValid ())
             return false;
             return false;
-        }
 
 
         $sErrorString = bx_check_password($this->getCleanValue('ID'), $this->getCleanValue('Password'), $this->getRole());
         $sErrorString = bx_check_password($this->getCleanValue('ID'), $this->getCleanValue('Password'), $this->getRole());
         $this->_setLoginError ($sErrorString);
         $this->_setLoginError ($sErrorString);
         return $sErrorString ? false : true;
         return $sErrorString ? false : true;
     }    
     }    
 
 
-    function isSubmittedAndValid () {
-        $bRet = parent::isSubmittedAndValid ();
-        if (!$bRet && !$this->getLoginError())
-            $this->_setLoginError (_t('_sys_txt_login_error'));
-        return $bRet;
-    }
-
-    protected function genCustomInputSubmitText ($aInput) {
+    protected function genCustomInputSubmitText ($aInput) 
+    {
         bx_import('BxDolPermalinks');
         bx_import('BxDolPermalinks');
         return '<div class="bx-form-right-line-aligned">
         return '<div class="bx-form-right-line-aligned">
                     <a href="' . BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password') . '">' . _t("_sys_txt_forgot_pasword") . '</a>
                     <a href="' . BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=forgot-password') . '">' . _t("_sys_txt_forgot_pasword") . '</a>
@@ -50,20 +43,24 @@ class BxBaseFormLogin extends BxTemplFormView {
                 <div class="clear_both"></div>';
                 <div class="clear_both"></div>';
     }
     }
 
 
-    public function getRole() {
+    public function getRole() 
+    {
         return $this->_iRole;
         return $this->_iRole;
     }
     }
 
 
-    public function setRole ($iRole) {
+    public function setRole ($iRole) 
+    {
         $this->_iRole = $iRole == BX_DOL_ROLE_ADMIN ? BX_DOL_ROLE_ADMIN : BX_DOL_ROLE_MEMBER;
         $this->_iRole = $iRole == BX_DOL_ROLE_ADMIN ? BX_DOL_ROLE_ADMIN : BX_DOL_ROLE_MEMBER;
     }
     }
 
 
-    public function getLoginError() {
-        return $this->_sLoginError;
+    public function getLoginError () 
+    {
+        return isset($this->aInputs['ID']['error']) ? $this->aInputs['ID']['error'] : '';
     }
     }
 
 
-    protected function _setLoginError ($s) {
-        $this->_sLoginError = $s;
+    protected function _setLoginError ($s) 
+    {
+        $this->aInputs['ID']['error'] = $s;
     }
     }
 }
 }
 
 

+ 1 - 3
template/scripts/BxBaseFormView.php

@@ -409,12 +409,10 @@ EOS;
         if (empty($sErrorIcon)) $sErrorIcon = '';
         if (empty($sErrorIcon)) $sErrorIcon = '';
 
 
         $sValueCode = '
         $sValueCode = '
-                    <div class="bx-form-value' . $sClassAdd . $sClassOneLineValue . '">
-                        <div class="bx-clear"></div>
+                    <div class="bx-form-value bx-clearfix' . $sClassAdd . $sClassOneLineValue . '">
                         ' . $sInputCode . '
                         ' . $sInputCode . '
                         ' . ($isOneLine ? '' : $sInfoIcon . $sErrorIcon) . '
                         ' . ($isOneLine ? '' : $sInfoIcon . $sErrorIcon) . '
                         ' . $sInputCodeExtra . '
                         ' . $sInputCodeExtra . '
-                        <div class="bx-clear"></div>
                     </div>';
                     </div>';
     
     
         if ($isOneLine)
         if ($isOneLine)