AntonLV 5 år sedan
förälder
incheckning
5ce28124b3

+ 3 - 3
install/sql/system.sql

@@ -3455,8 +3455,8 @@ INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_fo
 ('sys_login', 'ID', 2147483647, 1, 3),
 ('sys_login', 'Password', 2147483647, 1, 4),
 ('sys_login', 'rememberMe', 2147483647, 1, 5),
-('sys_login', 'login', 2147483647, 1, 6),
-('sys_login', 'submit_text', 2147483647, 1, 7),
+('sys_login', 'submit_text', 2147483647, 1, 6),
+('sys_login', 'login', 2147483647, 1, 7),
 
 ('sys_login_step2', 'phone', 2147483647, 1, 1),
 ('sys_login_step2', 'do_sendsms', 2147483647, 1, 2),
@@ -3473,7 +3473,7 @@ INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_fo
 ('sys_account_create', 'password', 2147483647, 1, 4),
 ('sys_account_create', 'receive_news', 2147483647, 1, 5),
 ('sys_account_create', 'do_submit', 2147483647, 1, 6),
-('sys_account_create', 'agreement', 2147483647, 1, 7),
+('sys_account_create', 'agreement', 2147483647, 0, 7),
 
 ('sys_account_settings_email', 'email', 2147483647, 1, 1),
 ('sys_account_settings_email', 'password_current', 2147483647, 1, 2),

+ 4 - 5
modules/boonex/english/data/langs/system/en.xml

@@ -2276,7 +2276,7 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_sys_file_handlers_code_viewer"><![CDATA[Code Viewer]]></string>
 	<string name="_sys_form_account"><![CDATA[Account]]></string>
 	<string name="_sys_form_account_input_agreement"><![CDATA[]]></string>
-	<string name="_sys_form_account_input_agreement_value"><![CDATA[<div class="bx-def-font-small bx-def-font-grayed">By signing up, you agree to the <a href="{0}">Terms of Service</a> and <a href="{1}">Privacy Policy</a>.</div>]]></string>
+	<string name="_sys_form_account_input_agreement_value"><![CDATA[By signing up, you agree to the <a href="{0}">Terms of Service</a> and <a href="{1}">Privacy Policy</a>.]]></string>
 	<string name="_sys_form_account_input_captcha"><![CDATA[Security Image]]></string>
 	<string name="_sys_form_account_input_captcha_error"><![CDATA[Security image input failed. Please, try again.]]></string>
 	<string name="_sys_form_account_input_captcha_label_text_image"><![CDATA[Type the text:]]></string>
@@ -2425,6 +2425,7 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_sys_form_login_input_caption_system_sendsms"><![CDATA[Send SMS]]></string>
 	<string name="_sys_form_login_input_caption_system_submit"><![CDATA[Submit]]></string>
 	<string name="_sys_form_login_input_caption_system_submit_text"><![CDATA[Submit Text]]></string>
+        <string name="_sys_form_login_input_agreement_value"><![CDATA[By logging in, you agree to the <a href="{0}">Terms of Service</a> and <a href="{1}">Privacy Policy</a>.]]></string>
 	<string name="_sys_form_login_input_code"><![CDATA[Code from SMS]]></string>
 	<string name="_sys_form_login_input_back"><![CDATA[You didn't receive an SMS? <a href="/page/login-step2">Send SMS again</a>.]]></string>
 	<string name="_sys_form_login_input_checkcode"><![CDATA[Submit]]></string>
@@ -3378,10 +3379,8 @@ If it is not enabled then please consider implement this optimization, since it
 	
     <string name="_sys_txt_login_2fa_sms_text"><![CDATA[Your verification code is {0}.]]></string>
     <string name="_sys_txt_login_2fa_sms_error_occured"><![CDATA[An error occurred, please report error to the site administrator.]]></string>
-    <string name="_sys_txt_join_description_question"><![CDATA[Already a member?]]></string>
-    <string name="_sys_txt_join_description_action"><![CDATA[Log in.]]></string>
-    <string name="_sys_txt_login_description_question"><![CDATA[Not a member yet?]]></string>
-    <string name="_sys_txt_login_description_action"><![CDATA[Sign up.]]></string>
+    <string name="_sys_txt_join_description_action"><![CDATA[Log in]]></string>
+    <string name="_sys_txt_login_description_action"><![CDATA[Create New Account]]></string>
     <string name="_sys_txt_login_error"><![CDATA[Entered email or password is incorrect. Please try again.]]></string>
     <string name="_sys_txt_login_locked"><![CDATA[Your account is locked and needs to be unlocked using <a href="{0}">forgot password page</a>.]]></string>
   

+ 4 - 5
modules/boonex/russian/data/langs/system/ru.xml

@@ -2262,7 +2262,7 @@ _sys_layout_1_column<?xml version="1.0" encoding="utf-8"?>
 	<string name="_sys_file_handlers_code_viewer"><![CDATA[Просмотр програмного кода]]></string>
 	<string name="_sys_form_account"><![CDATA[Аккаунт]]></string>
 	<string name="_sys_form_account_input_agreement"><![CDATA[]]></string>
-	<string name="_sys_form_account_input_agreement_value"><![CDATA[<div class="bx-def-font-small bx-def-font-grayed">Присоединяясь, Вы соглашаетесь с <a href="{0}">Правилами пользования</a> и <a href="{1}">Политикой конфиденциальности</a>.</div>]]></string>
+	<string name="_sys_form_account_input_agreement_value"><![CDATA[Присоединяясь, Вы соглашаетесь с <a href="{0}">Правилами пользования</a> и <a href="{1}">Политикой конфиденциальности</a>.]]></string>
 	<string name="_sys_form_account_input_captcha"><![CDATA[Капча]]></string>
 	<string name="_sys_form_account_input_captcha_error"><![CDATA[Проверка CAPTCHA не удалась. Попытайтесь ещё раз.]]></string>
 	<string name="_sys_form_account_input_captcha_label_text_image"><![CDATA[Введите текст:]]></string>
@@ -2411,6 +2411,7 @@ _sys_layout_1_column<?xml version="1.0" encoding="utf-8"?>
 	<string name="_sys_form_login_input_caption_system_sendsms"><![CDATA[Отправить SMS]]></string>
 	<string name="_sys_form_login_input_caption_system_submit"><![CDATA[Выполнить]]></string>
 	<string name="_sys_form_login_input_caption_system_submit_text"><![CDATA[Текст отправки]]></string>
+        <string name="_sys_form_login_input_agreement_value"><![CDATA[Заходя, Вы соглашаетесь с <a href="{0}">Правилами пользования</a> и <a href="{1}">Политикой конфиденциальности</a>.]]></string>
 	<string name="_sys_form_login_input_checkcode"><![CDATA[Выполнить]]></string>
 	<string name="_sys_form_login_input_code"><![CDATA[Код из SMS]]></string>
 	<string name="_sys_form_login_input_back"><![CDATA[Вы не получили SMS? <a href="javascript:history.back()">Отправить SMS ещё раз</a>]]></string>
@@ -3344,10 +3345,8 @@ _sys_layout_1_column<?xml version="1.0" encoding="utf-8"?>
     <string name="_sys_txt_login_2fa_description"><![CDATA[Двухэтапная авторизация включена. В дополнении к email-у и паролю, Вам нужно будет ввести код проверки, который мы вышлем вам в SMS.]]></string>
     <string name="_sys_txt_login_2fa_sms_text"><![CDATA[Ваш код проверки {0}.]]></string>
     <string name="_sys_txt_login_2fa_sms_error_occured"><![CDATA[Произошла ошибка, пожалуйста, уведомите о ней администратора сайта.]]></string>
-    <string name="_sys_txt_join_description_question"><![CDATA[Уже зарегистрировались?]]></string>
-    <string name="_sys_txt_join_description_action"><![CDATA[Заходите.]]></string>
-    <string name="_sys_txt_login_description_question"><![CDATA[Ещё нет аккаунта?]]></string>
-    <string name="_sys_txt_login_description_action"><![CDATA[Зарегистрируйтесь.]]></string>
+    <string name="_sys_txt_join_description_action"><![CDATA[Войти]]></string>
+    <string name="_sys_txt_login_description_action"><![CDATA[Создать новый аккаунт]]></string>
     <string name="_sys_txt_login_error"><![CDATA[Введённый email или пароль неправильны. Пожалуйста, попытайтесь снова.]]></string>
     <string name="_sys_txt_login_locked"><![CDATA[Ваш аккаунт заблокирован, для разблокировки, пожалуйста, используйте  <a href="{0}">страницу сброса пароля</a>.]]></string>
     <string name="_sys_txt_following_counter"><![CDATA[Подписки: {0}]]></string>

+ 8 - 2
template/block_join.html

@@ -2,5 +2,11 @@
 <bx_if:show_form>__content__</bx_if:show_form>
 <bx_if:show_login>
     <hr class="bx-def-hr bx-def-margin-sec-topbottom" />
-    <div><bx_text:_sys_txt_join_description_question /> <a href="__url__"><bx_text:_sys_txt_join_description_action /></a></div>
-</bx_if:show_login>
+    <div class="sys-jf-login">
+        <a class="bx-btn bx-def-font-align-center" href="__url__"><bx_text:_sys_txt_join_description_action /></a>
+    </div>
+</bx_if:show_login>
+<div class="sys-jf-agreement bx-def-margin-leftright-neg">
+    <hr class="bx-def-hr bx-def-margin-top" />
+    <div class="sys-jf-agreement-cnt bx-def-padding-top bx-def-padding-leftright bx-def-font-small bx-def-font-grayed">__agreement__</div>
+</div>

+ 6 - 2
template/block_login.html

@@ -4,10 +4,14 @@ __custom_html_before__
 __custom_html_after__
 <bx_if:show_join>
     <hr class="bx-def-hr bx-def-margin-sec-topbottom" />
-    <div>
-        <bx_text:_sys_txt_login_description_question /> <a href="__url__"><bx_text:_sys_txt_login_description_action /></a>
+    <div class="sys-lf-join">
+        <a class="bx-btn bx-def-font-align-center" href="__url__"><bx_text:_sys_txt_login_description_action /></a>
     </div>
 </bx_if:show_join>
+<div class="sys-lf-agreement bx-def-margin-leftright-neg">
+    <hr class="bx-def-hr bx-def-margin-top" />
+    <div class="sys-jf-agreement-cnt bx-def-padding-top bx-def-padding-leftright bx-def-font-small bx-def-font-grayed">__agreement__</div>
+</div>
 <bx_if:show_js_code>
     <script>
         (bx_login_init_ajax_form = function () {

+ 16 - 0
template/css/general.css

@@ -397,6 +397,22 @@ div.bx-account-unit-online {
     text-overflow: ellipsis;
 }
 
+/* --------------- Join/Login Forms */
+
+#sys_account .bx-form-element .bx-form-input-submit.bx-btn,
+#sys-form-login .bx-form-element .bx-form-input-submit.bx-btn {
+    width: 100%;
+    text-align: center;
+}
+#bx-form-element-submit_text .bx-form-value {
+    text-align: right;
+}
+.sys-jf-login .bx-btn,
+.sys-lf-join .bx-btn {
+    float: none;
+}
+
+
 /* --------------- Create Post Form */
 
 .sys-create-post-form {

+ 4 - 1
template/scripts/BxBaseServiceAccount.php

@@ -50,6 +50,8 @@ class BxBaseServiceAccount extends BxDol
             exit;
         }
 
+        $oPemalink = BxDolPermalinks::getInstance();
+
         if (isset($_SERVER['HTTP_REFERER']) && 0 === mb_stripos($_SERVER['HTTP_REFERER'], BX_DOL_URL_ROOT)) { // remember referrer
             $sJoinReferrer = $_SERVER['HTTP_REFERER'];
             $aNoRelocatePages = array('forgot-password', 'login', 'create-account', 'logout');
@@ -73,7 +75,7 @@ class BxBaseServiceAccount extends BxDol
 
         $aTmplVarsLogin = [];
         if(!isset($aParams['no_login_text']) || false === (bool)$aParams['no_login_text'])
-            $aTmplVarsLogin['url'] = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=login');
+            $aTmplVarsLogin['url'] = BX_DOL_URL_ROOT . $oPemalink->permalink('page.php?i=login');
         
         return BxDolTemplate::getInstance()->parseHtmlByName('block_join.html', [
             'bx_if:show_auth' => [
@@ -88,6 +90,7 @@ class BxBaseServiceAccount extends BxDol
                 'condition' => !empty($aTmplVarsLogin),
                 'content' => $aTmplVarsLogin
             ],
+            'agreement' => _t('_sys_form_account_input_agreement_value', BX_DOL_URL_ROOT . $oPemalink->permalink('page.php?i=terms'), BX_DOL_URL_ROOT . $oPemalink->permalink('page.php?i=privacy')),
         ]);
     }
 

+ 3 - 1
template/scripts/BxBaseServiceLogin.php

@@ -149,6 +149,7 @@ class BxBaseServiceLogin extends BxDol
             exit;
         }
 
+        $oPemalink = BxDolPermalinks::getInstance();
         $oForm = BxDolForm::getObjectInstance('sys_login', 'sys_login');
 
         $sCustomHtmlBefore = '';
@@ -172,7 +173,7 @@ class BxBaseServiceLogin extends BxDol
 
         $aTmplVarsJoin = [];
         if(strpos($sParams, 'no_join_text') === false)
-            $aTmplVarsJoin['url'] = BX_DOL_URL_ROOT . BxDolPermalinks::getInstance()->permalink('page.php?i=create-account');
+            $aTmplVarsJoin['url'] = BX_DOL_URL_ROOT . $oPemalink->permalink('page.php?i=create-account');
 
         $oTemplate = BxDolTemplate::getInstance();
         $oTemplate->addJs(array('jquery.form.min.js'));        
@@ -191,6 +192,7 @@ class BxBaseServiceLogin extends BxDol
                 'condition' => !empty($aTmplVarsJoin),
                 'content' => $aTmplVarsJoin
             ],
+            'agreement' => _t('_sys_form_login_input_agreement_value', BX_DOL_URL_ROOT . $oPemalink->permalink('page.php?i=terms'), BX_DOL_URL_ROOT . $oPemalink->permalink('page.php?i=privacy')),
             'bx_if:show_js_code' => [
                 'condition' => strpos($sParams, 'ajax_form') !== false,
                 'content' => []