RomanL 8 tahun lalu
induk
melakukan
3e0e2d8f09

+ 1 - 1
inc/classes/BxDolTwilio.php

@@ -62,7 +62,7 @@ class BxDolTwilio extends BxDolFactory implements iBxDolSingleton
     
     private function writeLog($sString)
 	{
-		$sFile = dirname(__FILE__) . '/bx_twilio.log';   
+		$sFile = BX_DIRECTORY_PATH_LOGS . '/bx_twilio.log';   
 		file_put_contents($sFile, date('m-d-Y H:i:s').": ", FILE_APPEND);            
 		file_put_contents($sFile, $sString."\n", FILE_APPEND);
 	}

+ 4 - 2
install/sql/system.sql

@@ -2895,6 +2895,7 @@ INSERT INTO `sys_form_inputs` (`object`, `module`, `name`, `value`, `values`, `c
 ('sys_login', 'system', 'submit_text', '', '', 0, 'custom', '_sys_form_login_input_caption_system_submit_text', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
 ('sys_login', 'system', 'phone', '', '', 0, 'text', '_sys_form_login_input_caption_system_phone', '_sys_form_login_input_phone', '', 1, 0, 0, '', '', '', 'PhoneExist', '', '_sys_form_login_input_phone_error_format', 'Xss', '', 1, 0),
 ('sys_login', 'system', 'code', '', '', 0, 'text', '_sys_form_login_input_caption_system_code', '_sys_form_login_input_code', '', 1, 0, 0, '', '', '', 'CodeExist', '', '_sys_form_login_input_code_error_empty', 'Xss', '', 0, 0),
+('sys_login', 'system', 'back', '', '', '', 'value', '_sys_form_login_input_caption_system_back', '_sys_form_login_input_back', '', 0, 0, 0, '', '', '', '', '', '', 'Xss', '', 0, 0),
 ('sys_login', 'system', 'do_checkcode', '_sys_form_login_input_checkcode', '', 0, 'submit', '_sys_form_login_input_caption_system_checkcode', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
 ('sys_login', 'system', 'do_sendsms', '_sys_form_login_input_sendsms', '', 0, 'submit', '_sys_form_login_input_caption_system_sendsms', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
 
@@ -2973,8 +2974,9 @@ INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_fo
 ('sys_login_step2', 'relocate', 2147483647, 1, 3),
 
 ('sys_login_step3', 'code', 2147483647, 1, 1),
-('sys_login_step3', 'do_checkcode', 2147483647, 1, 2),
-('sys_login_step3', 'relocate', 2147483647, 1, 3),
+('sys_login_step3', 'back', 2147483647, 1, 2),
+('sys_login_step3', 'do_checkcode', 2147483647, 1, 3),
+('sys_login_step3', 'relocate', 2147483647, 1, 4),
 
 ('sys_account_create', 'name', 2147483647, 1, 1),
 ('sys_account_create', 'email', 2147483647, 1, 2),

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

@@ -1966,6 +1966,7 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_sys_form_login_input_caption_system_captcha"><![CDATA[Captcha]]></string>
 	<string name="_sys_form_login_input_caption_system_checkcode"><![CDATA[Submit]]></string>
 	<string name="_sys_form_login_input_caption_system_code"><![CDATA[Code from SMS]]></string>
+	<string name="_sys_form_login_input_caption_system_back"><![CDATA[<a href="javascript:history.back()">Send new code</a>]]></string>
 	<string name="_sys_form_login_input_caption_system_delete_confirm"><![CDATA[Confirm Delete]]></string>
 	<string name="_sys_form_login_input_caption_system_delete_content"><![CDATA[Delete with Content]]></string>
 	<string name="_sys_form_login_input_caption_system_do_submit"><![CDATA[Sign up]]></string>
@@ -1985,6 +1986,7 @@ If it is not enabled then please consider implement this optimization, since it
 	<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_code"><![CDATA[Code from SMS]]></string>
+	<string name="_sys_form_login_input_back"><![CDATA[<a href="javascript:history.back()">Send new code</a>]]></string>
 	<string name="_sys_form_login_input_checkcode"><![CDATA[Submit]]></string>
 	<string name="_sys_form_login_input_email"><![CDATA[Email]]></string>
 	<string name="_sys_form_login_input_password"><![CDATA[Password]]></string>
@@ -2549,7 +2551,7 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_sys_txt_confirm_phone_set_phone_error_occured"><![CDATA[Error occurred, please try to login to your account and repeat verification.]]></string>
 	<string name="_sys_txt_confirm_phone_send_sms_error_occured"><![CDATA[Error occurred, please report error to site administrator.]]></string>
 	<string name="_sys_txt_confirm_phone_sms_text"><![CDATA[Your phone's verification code is {0}.]]></string>
-	<string name="_sys_txt_confirm_phone_confirm_success"><![CDATA[Your phone is confirmed successes.]]></string>
+	<string name="_sys_txt_confirm_phone_confirm_success"><![CDATA[Your phone number has been confirmed.]]></string>
 	<string name="_sys_txt_confirm_phone_set_phone_desc_set_phone"><![CDATA[Please enter a phone number for sending verification SMS.]]></string>
 	<string name="_sys_txt_confirm_phone_set_phone_desc_phone_confirmation"><![CDATA[Please enter verification code from the SMS.]]></string>
 	
@@ -2587,8 +2589,8 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_sys_txt_form_submission_error_csrf_expired"><![CDATA[Token expired. Please try again.]]></string>
 
     <string name="_sys_txt_homepage_cover"><![CDATA[Unity is strength... when there is teamwork and collaboration, wonderful things can be achieved.<br /><button class="bx-btn bx-hide-when-logged-in bx-def-margin-top" onclick="document.location='{0}'">Join Now!</button>]]></string>
-	<string name="_sys_txt_login_2fa_description"><![CDATA[Two-Factor Authentication is Enabled In addition to your username and password, you'll need to enter a verification code that we'll send you.]]></string>
-	<string name="_sys_txt_login_2fa_description2"><![CDATA[Please enter verification code from the SMS.]></string>
+	<string name="_sys_txt_login_2fa_description"><![CDATA[Two-factor authentication is enabled, please specify the phone number to send verification code to.]]></string>
+	
 	<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"><![CDATA[Already a member? <a href="{0}">Log in.</a>]]></string>

+ 2 - 1
modules/boonex/russian/data/langs/system/ru.xml

@@ -1965,6 +1965,7 @@
 	<string name="_sys_form_login_input_caption_system_captcha"><![CDATA[Капча]]></string>
 	<string name="_sys_form_login_input_caption_system_checkcode"><![CDATA[Выполнить]]></string>
 	<string name="_sys_form_login_input_caption_system_code"><![CDATA[Код из SMS]]></string>
+	<string name="_sys_form_login_input_caption_system_back"><![CDATA[<a href="javascript:history.back()">Отправить новый код</a>]]></string>
 	<string name="_sys_form_login_input_caption_system_delete_confirm"><![CDATA[Подтвердить удаление]]></string>
 	<string name="_sys_form_login_input_caption_system_delete_content"><![CDATA[Удалить с контентом]]></string>
 	<string name="_sys_form_login_input_caption_system_do_submit"><![CDATA[Присоединиться]]></string>
@@ -1985,6 +1986,7 @@
 	<string name="_sys_form_login_input_caption_system_submit_text"><![CDATA[Текст отправки]]></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[<a href="javascript:history.back()">Отправить новый код</a>]]></string>
 	<string name="_sys_form_login_input_email"><![CDATA[Имейл]]></string>
 	<string name="_sys_form_login_input_password"><![CDATA[Пароль]]></string>
 	<string name="_sys_form_login_input_phone"><![CDATA[Телефон]]></string>
@@ -2587,7 +2589,6 @@
 
     <string name="_sys_txt_homepage_cover"><![CDATA[Сплоченность людей — нерушимая крепость.<br /><button class="bx-btn bx-hide-when-logged-in bx-def-margin-top" onclick="document.location='{0}'">Присоедениться!</button>]]></string>
     <string name="_sys_txt_login_2fa_description"><![CDATA[Двухэтапная авторизация включена. В дополнении к имейлу и паролю, Вам нужно будет ввести код проверки, который мы вышлем вам в SMS.]]></string>
-	<string name="_sys_txt_login_2fa_description2"><![CDATA[Пожалуйста, введите код проверки из 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"><![CDATA[Уже зарегистрировались? <a href="{0}">Заходите.</a>]]></string>

+ 1 - 1
template/scripts/BxBaseServiceLogin.php

@@ -171,7 +171,7 @@ class BxBaseServiceLogin extends BxDol
             
             header('Location: ' . $sUrlRelocate);
         } 
-        return '<div class="bx-def-padding-sec-bottom">' . _t("_sys_txt_login_2fa_description2") . '</div>' .$oForm->getCode();
+        return $oForm->getCode();
     }
 }