diff --git a/modules/users/blocks/global.login.php b/modules/users/blocks/global.login.php index 3f746efe96..bd7d250895 100755 --- a/modules/users/blocks/global.login.php +++ b/modules/users/blocks/global.login.php @@ -163,6 +163,7 @@ function nv_block_login($block_config) $xtpl->assign('SRC_CAPTCHA', NV_BASE_SITEURL . 'index.php?scaptcha=captcha&t=' . NV_CURRENTTIME); $xtpl->assign('NV_HEADER', ''); $xtpl->assign('NV_REDIRECT', ''); + $xtpl->assign('CHECKSS', NV_CHECK_SESSION); $username_rule = empty($global_config['nv_unick_type']) ? sprintf($lang_global['username_rule_nolimit'], NV_UNICKMIN, NV_UNICKMAX) : sprintf($lang_global['username_rule_limit'], $lang_global['unick_type_' . $global_config['nv_unick_type']], NV_UNICKMIN, NV_UNICKMAX); $password_rule = empty($global_config['nv_upass_type']) ? sprintf($lang_global['password_rule_nolimit'], NV_UPASSMIN, NV_UPASSMAX) : sprintf($lang_global['password_rule_limit'], $lang_global['upass_type_' . $global_config['nv_upass_type']], NV_UPASSMIN, NV_UPASSMAX); @@ -333,6 +334,7 @@ function nv_block_login($block_config) $xtpl->parse('main.allowuserreg.field'); } + $xtpl->parse('main.allowuserreg.agreecheck'); $xtpl->parse('main.allowuserreg'); !empty($block_config['display_mode']) ? $xtpl->parse('main.' . $display_layout . '.allowuserreg2') : $xtpl->parse('main.' . $display_layout . '.allowuserreg2_form'); @@ -343,7 +345,6 @@ function nv_block_login($block_config) } $xtpl->parse('main.' . $display_layout); - $xtpl->parse('main'); $content = $xtpl->text('main'); } diff --git a/modules/users/blocks/global.user_button.php b/modules/users/blocks/global.user_button.php index 8d9fe83e3a..9884c297f9 100644 --- a/modules/users/blocks/global.user_button.php +++ b/modules/users/blocks/global.user_button.php @@ -100,6 +100,7 @@ $xtpl->assign('SRC_CAPTCHA', NV_BASE_SITEURL . 'index.php?scaptcha=captcha&t=' . NV_CURRENTTIME); $xtpl->assign('NV_HEADER', ''); $xtpl->assign('NV_REDIRECT', ''); + $xtpl->assign('CHECKSS', NV_CHECK_SESSION); $username_rule = empty($global_config['nv_unick_type']) ? sprintf($lang_global['username_rule_nolimit'], NV_UNICKMIN, NV_UNICKMAX) : sprintf($lang_global['username_rule_limit'], $lang_global['unick_type_' . $global_config['nv_unick_type']], NV_UNICKMIN, NV_UNICKMAX); $password_rule = empty($global_config['nv_upass_type']) ? sprintf($lang_global['password_rule_nolimit'], NV_UPASSMIN, NV_UPASSMAX) : sprintf($lang_global['password_rule_limit'], $lang_global['upass_type_' . $global_config['nv_upass_type']], NV_UPASSMIN, NV_UPASSMAX); @@ -265,6 +266,7 @@ $xtpl->parse('main.allowuserreg.field'); } + $xtpl->parse('main.allowuserreg.agreecheck'); $xtpl->parse('main.allowuserreg'); $xtpl->parse('main.allowuserreg2'); $xtpl->parse('main.allowuserreg3'); diff --git a/modules/users/theme.php b/modules/users/theme.php index 07ae58263e..a7d1d1db9c 100755 --- a/modules/users/theme.php +++ b/modules/users/theme.php @@ -27,7 +27,6 @@ function user_register($gfx_chk, $checkss, $data_questions, $array_field_config, global $module_info, $module_file, $global_config, $lang_global, $lang_module, $module_name, $nv_Request, $op, $nv_redirect; $xtpl = new XTemplate('register.tpl', NV_ROOTDIR . '/themes/' . $module_info['template'] . '/modules/' . $module_file); - $xtpl->assign('USER_REGISTER', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=register'); $xtpl->assign('NICK_MAXLENGTH', NV_UNICKMAX); $xtpl->assign('NICK_MINLENGTH', NV_UNICKMIN); $xtpl->assign('PASS_MAXLENGTH', NV_UPASSMAX); @@ -38,6 +37,9 @@ function user_register($gfx_chk, $checkss, $data_questions, $array_field_config, if ($group_id != 0) { $xtpl->assign('USER_REGISTER', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=register/' . $group_id); + } else { + $xtpl->assign('USER_REGISTER', NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=register'); + $xtpl->parse('main.agreecheck'); } $username_rule = empty($global_config['nv_unick_type']) ? sprintf($lang_global['username_rule_nolimit'], NV_UNICKMIN, NV_UNICKMAX) : sprintf($lang_global['username_rule_limit'], $lang_global['unick_type_' . $global_config['nv_unick_type']], NV_UNICKMIN, NV_UNICKMAX); diff --git a/themes/default/js/users.js b/themes/default/js/users.js index 0725081d72..04567f3b63 100644 --- a/themes/default/js/users.js +++ b/themes/default/js/users.js @@ -256,7 +256,14 @@ function reg_validForm(a) { window.location.href = "" != b.input ? b.input : window.location.href }, 6E3) }))) - } + }, + error: function (xhr, opt, err) { + if (window.console.log) { + console.log(xhr.status + ': ' + err); + } else { + alert(xhr.status + ': ' + err); + } + } })); return !1 }