diff --git a/modules/system/lang/en/validation.php b/modules/system/lang/en/validation.php index e359ac1a9..93a81b984 100644 --- a/modules/system/lang/en/validation.php +++ b/modules/system/lang/en/validation.php @@ -140,6 +140,23 @@ return [ 'new_message' => 'New message', 'payment_reviewed' => 'Payment has been reviewed', 'product_reviewed' => 'Post has been reviewed', + 'api' => [ + 'sign_up_excp' => 'Registration error', + 'bank_services_unavailable' => 'Bank services are unavailable.', + 'online_payment_failed' => 'Online payment has been failed.', + 'bank_payment_saved' => 'The bank transfer payment saved. Admin will consider it and approve later.', + 'bank_payment_failed' => 'The bank transfer payment failed.', + // 'contact_message_sent' => 'Contact message has been sent', + 'cannot_verify_invalid_email' => 'Cannot verify. Invalid email address.', + 'verification_link_sent' => 'Verification link has been sent to your email. Log in to tmex.gov.tm before checking your email.', + 'email_already_verified' => 'You have already verified your email address.', + 'sms_sent' => 'SMS has been sent.', + 'sms_not_sent_error' => 'SMS has not been sent. Error.', + 'user_not_tm_resident' => 'This user is not a resident.', + 'phone_already_verified' => 'You have already verified your phone number.', + 'phone_verified_message' => 'Your phone number has been succesfully verified', + 'phone_verification_code_invalid' => 'Invalid sms code', + ], /* |-------------------------------------------------------------------------- diff --git a/modules/system/lang/ru/validation.php b/modules/system/lang/ru/validation.php index 0d985bdb8..bd4d90341 100644 --- a/modules/system/lang/ru/validation.php +++ b/modules/system/lang/ru/validation.php @@ -140,6 +140,23 @@ return [ 'new_message' => 'Новое сообщение', 'payment_reviewed' => 'Платеж рассмотрен', 'product_reviewed' => 'Объявление рассмотрено', + 'api' => [ + 'sign_up_excp' => 'Ошибка при регистрации', + 'bank_services_unavailable' => 'Службы банка недоступны.', + 'online_payment_failed' => 'Онлайн оплата не прошла.', + 'bank_payment_saved' => 'Оплата банковским переводом сохранена и позже будет проверена администратором.', + 'bank_payment_failed' => 'Оплата банковским переводом не прошла.', + // 'contact_message_sent' => 'Письмо отправлено.', + 'cannot_verify_invalid_email' => 'Верификация Email невозможна. Неверный Email', + 'verification_link_sent' => 'Ссылка для подтверждения отправлена на ваш Email. Авторизуйтесь на tmex.gov.tm перед проверкой Email.', + 'email_already_verified' => 'Вы уже подтвердили свой Email.', + 'sms_sent' => 'СМС отправлен.', + 'sms_not_sent_error' => 'СМС не отправлен. Ошибка.', + 'user_not_tm_resident' => 'Пользователь не является резидентом.', + 'phone_already_verified' => 'Номер телефона уже подтвержден.', + 'phone_verified_message' => 'Ваш номер телефона подтвержден', + 'phone_verification_code_invalid' => 'Неверный СМС код', + ], /* |-------------------------------------------------------------------------- diff --git a/modules/system/lang/tm/validation.php b/modules/system/lang/tm/validation.php index ff51eb1b1..dede076bd 100644 --- a/modules/system/lang/tm/validation.php +++ b/modules/system/lang/tm/validation.php @@ -142,6 +142,23 @@ return [ 'new_message' => 'Täze hat', 'payment_reviewed' => 'Töleg gözden geçirildi', 'product_reviewed' => 'Bildiriş gözden geçirildi', + 'api' => [ + 'sign_up_excp' => 'Hasaba alyş ýalňyşy', + 'bank_services_unavailable' => 'Bank hyzmatlary elýeterli däl.', + 'online_payment_failed' => 'Onlaýn töleg geçmedi.', + 'bank_payment_saved' => 'Bank üsti bilen töleg ýazyldy we soňra administrator tarapyndan gözden geçiriler.', + 'bank_payment_failed' => 'Bank üsti bilen töleg geçmedi.', + // 'contact_message_sent' => 'Hat ugradyldy.', + 'cannot_verify_invalid_email' => 'Tassyklama grçmedi. El. bukjaňyz nädogry.', + 'verification_link_sent' => 'Tassyklama düwmesi El. bukjaňyza iberildi. El. bukjaňyzy barlamazdan öň tmex.gov.tm-da şahsy hasabyňyza giriň.', + 'email_already_verified' => 'Siziň el. bukjaňyz eýýäm tassyklanan.', + 'sms_sent' => 'SMS iberildi.', + 'sms_not_sent_error' => 'SMS iberilmedi. Ýalňyş.', + 'user_not_tm_resident' => 'Ulanyjy ýerli ýaşaýjy däl.', + 'phone_already_verified' => 'Siziň telefon belgiňiz eýýäm tassyklanan.', + 'phone_verified_message' => 'Siziň telefon belgiňiz tassyklandy', + 'phone_verification_code_invalid' => 'Nädogry SMS kody', + ], /* |-------------------------------------------------------------------------- diff --git a/plugins/ahmadfatoni/apigenerator/controllers/api/EmailVerificationController.php b/plugins/ahmadfatoni/apigenerator/controllers/api/EmailVerificationController.php index f80f103d3..a15fe171b 100644 --- a/plugins/ahmadfatoni/apigenerator/controllers/api/EmailVerificationController.php +++ b/plugins/ahmadfatoni/apigenerator/controllers/api/EmailVerificationController.php @@ -34,16 +34,16 @@ class EmailVerificationController extends KabinetAPIController } catch(Throwable $th) { \Log::info($th); - return response()->json('Cannot verify. Invalid email address.', 400); + return response()->json(trans('validation.api.cannot_verify_invalid_email', [], $inputData['locale']), 400); } $this->user->email_activation_code = $code; $this->user->save(); - return response()->json('Verification link has been sent. Log in to tmex.gov.tm before checking your email.', 201); + return response()->json(trans('validation.api.verification_link_sent', [], $inputData['locale']), 201); } else { - return response()->json('You have already verified your email address.', 200); + return response()->json(trans('validation.api.email_already_verified', [], $inputData['locale']), 200); } } } diff --git a/plugins/ahmadfatoni/apigenerator/controllers/api/SmsController.php b/plugins/ahmadfatoni/apigenerator/controllers/api/SmsController.php index 4ff5ddf54..fd66f1dc5 100644 --- a/plugins/ahmadfatoni/apigenerator/controllers/api/SmsController.php +++ b/plugins/ahmadfatoni/apigenerator/controllers/api/SmsController.php @@ -30,12 +30,24 @@ class SmsController extends KabinetAPIController if($this->user->dial_code != '+993') { return response()->json([ 'dial_code' => $this->user->dial_code, - 'message' => 'This user is not a resident of Turkmenistan.' + 'result' => 1, + 'message' => [ + 'ru' => trans('validation.api.user_not_tm_resident', [], 'ru'), + 'en' => trans('validation.api.user_not_tm_resident', [], 'en'), + 'tm' => trans('validation.api.user_not_tm_resident', [], 'tm'), + ] ], 400); } if($this->user->phone_verified && $this->user->dial_code == '+993') { - return response()->json('User phone already verified', 200); + return response()->json([ + 'result' => 1, + 'message' => [ + 'ru' => trans('validation.api.phone_already_verified', [], 'ru'), + 'en' => trans('validation.api.phone_already_verified', [], 'en'), + 'tm' => trans('validation.api.phone_already_verified', [], 'tm'), + ] + ], 200); } $code = random_int(1000, 9999); @@ -49,21 +61,33 @@ class SmsController extends KabinetAPIController $this->user->save(); return response()->json([ 'result' => $result, - 'message' => 'Message has been succesfully sent' + 'message' => [ + 'ru' => trans('validation.api.sms_sent', [], 'ru'), + 'en' => trans('validation.api.sms_sent', [], 'en'), + 'tm' => trans('validation.api.sms_sent', [], 'tm'), + ] ], 201); break; case 1: return response()->json([ 'result' => $result, - 'message' => 'Error' + 'message' => [ + 'ru' => trans('validation.api.sms_not_sent_error', [], 'ru'), + 'en' => trans('validation.api.sms_not_sent_error', [], 'en'), + 'tm' => trans('validation.api.sms_not_sent_error', [], 'tm'), + ] ], 500); break; default: return response()->json([ 'result' => $result, - 'message' => 'Error' + 'message' => [ + 'ru' => trans('validation.api.sms_not_sent_error', [], 'ru'), + 'en' => trans('validation.api.sms_not_sent_error', [], 'en'), + 'tm' => trans('validation.api.sms_not_sent_error', [], 'tm'), + ] ], 500); break; } @@ -74,12 +98,24 @@ class SmsController extends KabinetAPIController if($this->user->dial_code != '+993') { return response()->json([ 'dial_code' => $this->user->dial_code, - 'message' => 'This user is not a resident of Turkmenistan.' + 'status' => false, + 'message' => [ + 'ru' => trans('validation.api.user_not_tm_resident', [], 'ru'), + 'en' => trans('validation.api.user_not_tm_resident', [], 'en'), + 'tm' => trans('validation.api.user_not_tm_resident', [], 'tm'), + ] ], 400); } if($this->user->phone_verified && $this->user->dial_code == '+993') { - return response()->json('User phone already verified', 200); + return response()->json([ + 'status' => false, + 'message' => [ + 'ru' => trans('validation.api.phone_already_verified', [], 'ru'), + 'en' => trans('validation.api.phone_already_verified', [], 'en'), + 'tm' => trans('validation.api.phone_already_verified', [], 'tm'), + ] + ], 200); } $validator = Validator::make($request->all(), [ @@ -93,9 +129,23 @@ class SmsController extends KabinetAPIController $this->user->phone_verified = true; $this->user->phone_activation_code = null; $this->user->save(); - return response()->json('User phone has been succesfully verified', 201); + return response()->json([ + 'status' => true, + 'message' => [ + 'ru' => trans('validation.api.phone_verified_message', [], 'ru'), + 'en' => trans('validation.api.phone_verified_message', [], 'en'), + 'tm' => trans('validation.api.phone_verified_message', [], 'tm'), + ] + ], 201); } else { - return response()->json('Wrong sms code', 400); + return response()->json([ + 'status' => false, + 'message' => [ + 'ru' => trans('validation.api.phone_verification_code_invalid', [], 'ru'), + 'en' => trans('validation.api.phone_verification_code_invalid', [], 'en'), + 'tm' => trans('validation.api.phone_verification_code_invalid', [], 'tm'), + ] + ], 400); } } } diff --git a/plugins/ahmadfatoni/apigenerator/controllers/api/TransactionsApiController.php b/plugins/ahmadfatoni/apigenerator/controllers/api/TransactionsApiController.php index eee69b20a..939d30bb2 100644 --- a/plugins/ahmadfatoni/apigenerator/controllers/api/TransactionsApiController.php +++ b/plugins/ahmadfatoni/apigenerator/controllers/api/TransactionsApiController.php @@ -68,14 +68,24 @@ class TransactionsApiController extends KabinetAPIController return response()->json(['formUrl' => $result['formUrl']], 200); } else { - return response()->json('bank services are unavailable', 200); + return response()->json(['error' => [ + 'ru' => trans('validation.api.bank_services_unavailable', [], 'ru'), + 'en' => trans('validation.api.bank_services_unavailable', [], 'en'), + 'tm' => trans('validation.api.bank_services_unavailable', [], 'tm'), + ]], 200); } } catch(\Throwable $th){ $payment->status = 'failed'; $payment->save(); - return response()->json(['message' => $th->getMessage()], 500); + Log::info($th->getMessage()); + + return response()->json(['error' => [ + 'ru' => trans('validation.api.online_payment_failed', [], 'ru'), + 'en' => trans('validation.api.online_payment_failed', [], 'en'), + 'tm' => trans('validation.api.online_payment_failed', [], 'tm'), + ]], 500); } } elseif($payment->payment_type == 'bank'){ @@ -84,9 +94,17 @@ class TransactionsApiController extends KabinetAPIController if($payment->save()){ Event::fire('tps.payment.received',$payment); - return response()->json('The payment saved. Admin will consider it and approve later', 200); + return response()->json(['success' => [ + 'ru' => trans('validation.api.bank_payment_saved', [], 'ru'), + 'en' => trans('validation.api.bank_payment_saved', [], 'en'), + 'tm' => trans('validation.api.bank_payment_saved', [], 'tm'), + ]], 200); } else { - return response()->json('The payment saving failed.', 500); + return response()->json(['error' => [ + 'ru' => trans('validation.api.bank_payment_failed', [], 'ru'), + 'en' => trans('validation.api.bank_payment_failed', [], 'en'), + 'tm' => trans('validation.api.bank_payment_failed', [], 'tm'), + ]], 500); } } diff --git a/plugins/rainlab/user/components/resetpassword/check.htm b/plugins/rainlab/user/components/resetpassword/check.htm index 49677d9eb..51a0d9889 100644 --- a/plugins/rainlab/user/components/resetpassword/check.htm +++ b/plugins/rainlab/user/components/resetpassword/check.htm @@ -1 +1,5 @@ -

{{ 'auth.password_reset_check'|_ }}

\ No newline at end of file +
+
+ {{ 'auth.password_reset_check'|_ }} +
+
\ No newline at end of file diff --git a/plugins/rainlab/user/components/resetpassword/complete.htm b/plugins/rainlab/user/components/resetpassword/complete.htm index 629350257..7be7d41d4 100644 --- a/plugins/rainlab/user/components/resetpassword/complete.htm +++ b/plugins/rainlab/user/components/resetpassword/complete.htm @@ -1 +1,14 @@ -

{{ 'auth.password_reset_complete'|_ }}

\ No newline at end of file +
+
+ {{ 'auth.password_reset_complete'|_ }} +
+
+ +
+ +
+
+
\ No newline at end of file diff --git a/plugins/rainlab/user/components/resetpassword/default.htm b/plugins/rainlab/user/components/resetpassword/default.htm index b2eed578c..de481cd2a 100644 --- a/plugins/rainlab/user/components/resetpassword/default.htm +++ b/plugins/rainlab/user/components/resetpassword/default.htm @@ -1,7 +1,12 @@ -
- {% if __SELF__.code == null %} - {% partial __SELF__ ~ '::restore' %} - {% else %} - {% partial __SELF__ ~ '::reset' %} - {% endif %} -
\ No newline at end of file +
+
+
+ {% if __SELF__.code == null %} + {% partial __SELF__ ~ '::restore' %} + {% else %} + {% partial __SELF__ ~ '::reset' %} + {% endif %} +
+
+
+ diff --git a/plugins/rainlab/user/components/resetpassword/reset.htm b/plugins/rainlab/user/components/resetpassword/reset.htm index 42a786c45..c95da1b6e 100644 --- a/plugins/rainlab/user/components/resetpassword/reset.htm +++ b/plugins/rainlab/user/components/resetpassword/reset.htm @@ -1,22 +1,22 @@ -

- {{ 'auth.password_reset_check_mail_message'|_ }} -

- -
- - - - - -
- - +
+
+ {{ 'account.new_password'|_ }}
+ +
+ +
-
- -
- +
+ +
+ +
+ +
+ +
+ diff --git a/plugins/rainlab/user/components/resetpassword/restore.htm b/plugins/rainlab/user/components/resetpassword/restore.htm index c15828e91..ad5afb1a0 100644 --- a/plugins/rainlab/user/components/resetpassword/restore.htm +++ b/plugins/rainlab/user/components/resetpassword/restore.htm @@ -1,17 +1,17 @@ -

- {{ 'auth.password_reset'|_ }} {{ 'auth.password_reset_enter_email'|_ }} -

- -
-
- - +
+
+ {{ 'auth.password_reset'|_ }}
-
- -
- - \ No newline at end of file +
+
+ +
+
+ +
+ +
+
\ No newline at end of file diff --git a/plugins/rainlab/user/lang/tm/lang.php b/plugins/rainlab/user/lang/tm/lang.php index 330c03aae..5e89adfe6 100644 --- a/plugins/rainlab/user/lang/tm/lang.php +++ b/plugins/rainlab/user/lang/tm/lang.php @@ -201,7 +201,7 @@ return [ 'email_verification_check_message' => 'El. bukjaňyzy barlamygyňyzy haýyş edýäris', 'email_verified_message' => 'Siziň el. bukjaňyz tassyklandy', 'email_verification_link_invalid' => 'Tassyklama kody nädogry', - 'email_already_verified' => 'Siz el. bukjaňyz eýýäm tassyklanan', + 'email_already_verified' => 'Siziň el. bukjaňyz eýýäm tassyklanan', 'phone_verified_message' => 'Siziň el telefonyňyz tassyklandy', 'phone_verification_code_invalid' => 'Nädogry SMS kody', ], diff --git a/plugins/tps/birzha/components/PaymentApi.php b/plugins/tps/birzha/components/PaymentApi.php index 764d7dc26..f0d1f8de6 100644 --- a/plugins/tps/birzha/components/PaymentApi.php +++ b/plugins/tps/birzha/components/PaymentApi.php @@ -36,6 +36,10 @@ class PaymentApi extends ComponentBase $payment_id = $this->property('payment_id'); $payment = Payment::find($payment_id); + if(is_null($payment)) { + return Redirect::to('/404'); + } + if($payment && \Input::get('status') === 'success' && \Input::get('orderId') === $payment->order_id) { $responce = json_decode(CardApi::getStatus($payment->order_id), true); diff --git a/plugins/vdomah/jwtauth/routes.php b/plugins/vdomah/jwtauth/routes.php index da7684ed2..b75122faf 100644 --- a/plugins/vdomah/jwtauth/routes.php +++ b/plugins/vdomah/jwtauth/routes.php @@ -109,11 +109,16 @@ Route::group(['prefix' => 'api'], function() { $credentials = Input::only($login_fields); $rules = [ - 'email' => 'required|between:6,191|email', - 'username' => 'required|digits_between:8,20|numeric', + 'email' => 'required|between:6,191|email|unique:users', + 'username' => 'required|numeric|unique:users', 'dial_code' => 'required', ]; + // to check username + $credentials = array_merge($credentials,[ + 'username' => $credentials['dial_code'] . $credentials['username'] + ]); + $validation = \Validator::make($credentials, $rules,(new UserModel)->messages); if ($validation->fails()) { return Response::json(['error' => $validation->errors()], 400); @@ -130,9 +135,7 @@ Route::group(['prefix' => 'api'], function() { if (!array_key_exists('password_confirmation', $credentials) && array_key_exists('password', $credentials)) { $credentials['password_confirmation'] = $credentials['password']; } - $userModel = Auth::register(array_merge($credentials,[ - 'username' => $credentials['dial_code'] . $credentials['username'] - ]), $automaticActivation); + $userModel = Auth::register($credentials, $automaticActivation); if ($userModel->methodExists('getAuthApiSignupAttributes')) { $user = $userModel->getAuthApiSignupAttributes(); @@ -151,7 +154,14 @@ Route::group(['prefix' => 'api'], function() { ]; } } catch (Exception $e) { - return Response::json(['error' => $e->getMessage()], 401); + + \Log::info($e->getMessage()); + + return Response::json(['error' => [ + 'ru' => trans('validation.api.sign_up_excp', [], 'ru'), + 'en' => trans('validation.api.sign_up_excp', [], 'en'), + 'tm' => trans('validation.api.sign_up_excp', [], 'tm'), + ]], 401); } $token = JWTAuth::fromUser($userModel); diff --git a/themes/birzha/assets/css/main.css b/themes/birzha/assets/css/main.css index d516acdc1..755d0e706 100644 --- a/themes/birzha/assets/css/main.css +++ b/themes/birzha/assets/css/main.css @@ -156,6 +156,51 @@ li { } + +/* Accaunt ============================================ */ + +.acc_lang { + position: fixed; + top: 50px; + right: 80px; + background: #fff; + border-radius: 10px; + z-index: 130; +} + +.acc_lang .auto_container { + padding: 0; +} + +.acc_lang .inner { + display: flex; + align-items: center; + padding: 10px 15px; +} + +.acc_lang-item { + font-size: 14px; + font-weight: 600; + line-height: 1.5; + text-transform: uppercase; + display: block; + margin-right: 20px; + + transition: .2s linear; + -ms-transition: .2s linear; + -webkit-transition: .2s linear; +} + +.acc_lang-item:hover { + color: var(--blue); +} + +.acc_lang-item:last-child { + margin-right: 0; +} + +/* Accaunt end ======================================== */ + /* Home page */ /* Register ============================================ */ .register { @@ -186,12 +231,26 @@ li { position: absolute; top: 0; left: 0; - background: rgba(0, 49, 151, .5); + /* background: rgba(0, 49, 151, .5); */ + background: url("../images/IMG-2.png") no-repeat center; + background-size: cover; + width: 100%; + height: 100%; + z-index: -2; +} + +.register::before { + content: ''; + position: absolute; + top: 0; + left: 0; + background: rgba(0, 49, 151, .3); width: 100%; height: 100%; z-index: -1; } + .register_wrap { /* position: absolute; top: 50%; @@ -769,6 +828,30 @@ li { display: none; } +.password::after { + content: ''; + position: absolute; + top: 0; + left: 0; + /* background: rgba(0, 49, 151, .5); */ + background: url("../images/IMG-2.png") no-repeat center; + background-size: cover; + width: 100%; + height: 100%; + z-index: -2; +} + +.password::before { + content: ''; + position: absolute; + top: 0; + left: 0; + background: rgba(0, 49, 151, .3); + width: 100%; + height: 100%; + z-index: -1; +} + .password.active { display: block; } @@ -808,7 +891,7 @@ li { background: #fff; padding: 80px 60px; - display: none; + /* display: none; */ } .pass_title { @@ -855,6 +938,11 @@ li { padding: 20px 0; } +.password_form .btn_bg { + margin: 25px 0; + width: 100%; +} + /* Change Password end ============================================= */ @@ -6780,11 +6868,6 @@ input::-webkit-calendar-picker-indicator { text-align: center; } - .form_txt { - font-size: 16px; - margin-bottom: 15px; - } - .contact_input { margin: 10px 0; } @@ -6983,4 +7066,4 @@ input::-webkit-calendar-picker-indicator { font-size: 12px; } -} +} \ No newline at end of file diff --git a/themes/birzha/assets/images/IMG-2.png b/themes/birzha/assets/images/IMG-2.png new file mode 100644 index 000000000..78ea7ab6f Binary files /dev/null and b/themes/birzha/assets/images/IMG-2.png differ diff --git a/themes/birzha/assets/js/accaunt.js b/themes/birzha/assets/js/accaunt.js new file mode 100644 index 000000000..3875dc33b --- /dev/null +++ b/themes/birzha/assets/js/accaunt.js @@ -0,0 +1,102 @@ +// timing ==================== +function sleep(time) { + return new Promise((resolve) => setTimeout(resolve, time)); +} +// timing ==================== + + +let register = document.querySelector('.register'); +let register_btn = document.querySelectorAll('.register_btn'); +let log_in = document.querySelectorAll('.log_in'); +let btn_1 = document.querySelector('#btn-1'); +let btn_2 = document.querySelector('#btn-2'); + +let register_content = document.querySelector('.register_content'); +let register_content_2 = document.querySelector('.register_content_2'); + +let phone_box = document.querySelectorAll('.phone_box'); +let iti__country = document.querySelectorAll('.iti__country'); +let iti__country_list = document.querySelectorAll('.iti__country-list'); + + +if (register_btn != undefined) { + register_btn.forEach(x => { + x.addEventListener('click', function () { + sleep(2).then(() => { + register.classList.toggle('active'); + btn_2.classList.add('active'); + btn_1.classList.remove('active'); + selectElement('body').classList.add('active'); + + + register_content.classList.add('active'); + register_content_2.classList.remove('active'); + }); + }); + }) +} + +if (log_in != undefined) { + log_in.forEach(x => { + x.addEventListener('click', function () { + sleep(2).then(() => { + register.classList.toggle('active'); + btn_1.classList.add('active'); + btn_2.classList.remove('active'); + selectElement('body').classList.add('active'); + + + register_content.classList.remove('active'); + register_content_2.classList.add('active'); + }); + }); + }) +} + +if (btn_1 != undefined) { + btn_1.addEventListener('click', function () { + sleep(2).then(() => { + btn_1.classList.add('active'); + btn_2.classList.remove('active'); + + register_content.classList.remove('active'); + register_content_2.classList.add('active'); + }); + }); +} + +if (btn_2 != undefined) { + btn_2.addEventListener('click', function () { + sleep(2).then(() => { + btn_2.classList.add('active'); + btn_1.classList.remove('active'); + + register_content.classList.add('active'); + register_content_2.classList.remove('active'); + }); + }); +} + +if (phone_box != undefined) { + phone_box.forEach(x => { + x.addEventListener('click', function () { + sleep(2).then(() => { + iti__country_list.forEach(e => { + e.classList.toggle('active'); + }) + }); + }); + }) +} + +if (iti__country != undefined) { + iti__country.forEach(x => { + x.addEventListener('click', function () { + sleep(2).then(() => { + iti__country_list.forEach(e => { + e.classList.remove('active'); + }) + }); + }); + }) +} \ No newline at end of file diff --git a/themes/birzha/layouts/account.htm b/themes/birzha/layouts/account.htm new file mode 100644 index 000000000..fae66a039 --- /dev/null +++ b/themes/birzha/layouts/account.htm @@ -0,0 +1,100 @@ +[localePicker] +forceUrl = 1 + +[account] +redirect = "index" +paramCode = "code" +forceSecure = 0 +requirePassword = 0 +view = "signin" + +[session] +security = "all" +== + +== + + + + + + + + + + + + + + {% styles %} + + + + + + {{this.page.title}} + + + + +{% flash success %} +

+ {{ message }} +

+{% endflash %} + +{% flash error %} +

+ {{ message }} +

+{% endflash %} + +
+
+
+ {% for code, name in locales %} + + {{ code }} + + {% endfor %} +
+
+
+ +{% page %} + + + +{% framework extras %} +{% scripts %} + + + + + \ No newline at end of file diff --git a/themes/birzha/pages/bank_result.htm b/themes/birzha/pages/bank_result.htm index 685521e42..e778ec863 100644 --- a/themes/birzha/pages/bank_result.htm +++ b/themes/birzha/pages/bank_result.htm @@ -9,11 +9,11 @@ localeTitle[ru] = "bank_result" localeUrl[en] = "/bank_result/:payment_id" localeUrl[ru] = "/bank_result/:payment_id" -[paymentapi] -payment_id = "{{ :payment_id }}" - [session] security = "user" -redirect = "index" +redirect = "vojti" + +[paymentapi] +payment_id = "{{ :payment_id }}" == {% component 'paymentapi' %} \ No newline at end of file diff --git a/themes/birzha/pages/category.htm b/themes/birzha/pages/category.htm index ca369d153..c9002c6e7 100644 --- a/themes/birzha/pages/category.htm +++ b/themes/birzha/pages/category.htm @@ -9,6 +9,10 @@ localeTitle[ru] = "Категория" localeUrl[en] = "/category/:slug" localeUrl[ru] = "/category/:slug" +[session] +security = "user" +redirect = "vojti" + [categories] active = 1 slug = "{{ :slug }}" diff --git a/themes/birzha/pages/contact-us.htm b/themes/birzha/pages/contact-us.htm index ba2cc5c98..c35c59559 100644 --- a/themes/birzha/pages/contact-us.htm +++ b/themes/birzha/pages/contact-us.htm @@ -9,6 +9,10 @@ localeTitle[ru] = "Contact us" localeUrl[en] = "/contact-us" localeUrl[ru] = "/contact-us" +[session] +security = "user" +redirect = "vojti" + [TPS\Birzha\Components\ContactForm contactForm] == {% component 'contactForm' %} \ No newline at end of file diff --git a/themes/birzha/pages/index.htm b/themes/birzha/pages/index.htm index 916762844..b050a9dc3 100644 --- a/themes/birzha/pages/index.htm +++ b/themes/birzha/pages/index.htm @@ -10,6 +10,10 @@ localeTitle[ru] = "Главная страница" localeUrl[en] = "/" localeUrl[ru] = "/" +[session] +security = "user" +redirect = "vojti" + [offers] perPage = 0 sortOrder = "desc" diff --git a/themes/birzha/pages/kabinet/add_offer.htm b/themes/birzha/pages/kabinet/add_offer.htm index e942a141f..3a0ee926b 100644 --- a/themes/birzha/pages/kabinet/add_offer.htm +++ b/themes/birzha/pages/kabinet/add_offer.htm @@ -3,14 +3,14 @@ url = "/add-offer" layout = "default" is_hidden = 0 +[viewBag] +localeTitle[ru] = "Добавить объявление" + [offerform] [session] security = "user" -redirect = "index" - -[viewBag] -localeTitle[ru] = "Добавить объявление" +redirect = "vojti" == {% component 'offerform' %} diff --git a/themes/birzha/pages/kabinet/balance.htm b/themes/birzha/pages/kabinet/balance.htm index 3e52dcb6e..791be8384 100644 --- a/themes/birzha/pages/kabinet/balance.htm +++ b/themes/birzha/pages/kabinet/balance.htm @@ -13,6 +13,6 @@ localeUrl[ru] = "/balance" [session] security = "user" -redirect = "index" +redirect = "vojti" == {% component 'balance' %} \ No newline at end of file diff --git a/themes/birzha/pages/kabinet/edit_post.htm b/themes/birzha/pages/kabinet/edit_post.htm index 7b86879f0..64a372bf9 100644 --- a/themes/birzha/pages/kabinet/edit_post.htm +++ b/themes/birzha/pages/kabinet/edit_post.htm @@ -8,11 +8,13 @@ localeUrl[en] = "/edit-post/:id" localeUrl[ru] = "/edit-post/:id" localeTitle[ru] = "Изменить объявление" +[session] +security = "user" +redirect = "vojti" + [offerform] productId = "{{ :id }}" -[session] -security = "user" -redirect = "index" + == {% component 'offerform' %} \ No newline at end of file diff --git a/themes/birzha/pages/kabinet/messages.htm b/themes/birzha/pages/kabinet/messages.htm index 36848447e..4195292c9 100644 --- a/themes/birzha/pages/kabinet/messages.htm +++ b/themes/birzha/pages/kabinet/messages.htm @@ -7,10 +7,10 @@ is_hidden = 0 localeTitle[ru] = "Сообщения" localeUrl[ru] = "/messages" -[messages] - [session] security = "user" -redirect = "index" +redirect = "vojti" + +[messages] == {% component 'messages' %} \ No newline at end of file diff --git a/themes/birzha/pages/kabinet/my_offers.htm b/themes/birzha/pages/kabinet/my_offers.htm index c4eee699f..4c7177da6 100644 --- a/themes/birzha/pages/kabinet/my_offers.htm +++ b/themes/birzha/pages/kabinet/my_offers.htm @@ -9,11 +9,12 @@ localeTitle[ru] = "My posts" localeUrl[en] = "/my-posts" localeUrl[ru] = "/my-posts" +[session] +security = "user" +redirect = "vojti" + [myOffers] perPage = 0 -[session] -security = "user" -redirect = "index" == {% component 'myOffers' %} \ No newline at end of file diff --git a/themes/birzha/pages/kabinet/profile.htm b/themes/birzha/pages/kabinet/profile.htm index 57c8affec..baca2a89e 100644 --- a/themes/birzha/pages/kabinet/profile.htm +++ b/themes/birzha/pages/kabinet/profile.htm @@ -11,7 +11,7 @@ localeTitle[ru] = "Профиль" [session] security = "user" -redirect = "index" +redirect = "vojti" ==
diff --git a/themes/birzha/pages/kabinet/transactions.htm b/themes/birzha/pages/kabinet/transactions.htm index b5f1644fe..450134453 100644 --- a/themes/birzha/pages/kabinet/transactions.htm +++ b/themes/birzha/pages/kabinet/transactions.htm @@ -2,14 +2,19 @@ title = "Balans taryhy" url = "/balans-taryhy" layout = "default" is_hidden = 0 + +[session] +security = "user" +redirect = "vojti" == transactions()->orderBy('id', 'desc')->paginate(5); + if(\Auth::user()) { + $this['transactions'] = \Auth::user()->transactions()->orderBy('id', 'desc')->paginate(5); + } } ?> == -
diff --git a/themes/birzha/pages/kabinet/verify_email.htm b/themes/birzha/pages/kabinet/verify_email.htm index 7488567a2..ed0bab273 100644 --- a/themes/birzha/pages/kabinet/verify_email.htm +++ b/themes/birzha/pages/kabinet/verify_email.htm @@ -5,7 +5,7 @@ is_hidden = 0 [session] security = "user" -redirect = "index" +redirect = "vojti" [emailverify] code = "{{ :code }}" diff --git a/themes/birzha/pages/kategorii.htm b/themes/birzha/pages/kategorii.htm index b70e5bf13..1ef168fe1 100644 --- a/themes/birzha/pages/kategorii.htm +++ b/themes/birzha/pages/kategorii.htm @@ -9,6 +9,10 @@ localeTitle[ru] = "Категории" localeUrl[en] = "/categories" localeUrl[ru] = "/kategorii" +[session] +security = "user" +redirect = "vojti" + [categories] active = 1 slug = "{{ :slug }}" diff --git a/themes/birzha/pages/offer.htm b/themes/birzha/pages/offer.htm index f6836868b..a9c147a39 100644 --- a/themes/birzha/pages/offer.htm +++ b/themes/birzha/pages/offer.htm @@ -9,6 +9,10 @@ localeTitle[ru] = "Объявление" localeUrl[en] = "/offer/:slug/:id" localeUrl[ru] = "/offer/:slug/:id" +[session] +security = "user" +redirect = "vojti" + [singleoffer] productSlug = "{{ :slug }}" offerId = "{{ :id }}" diff --git a/themes/birzha/pages/politika-konfidencialnosti.htm b/themes/birzha/pages/politika-konfidencialnosti.htm index f9263b957..030d78906 100644 --- a/themes/birzha/pages/politika-konfidencialnosti.htm +++ b/themes/birzha/pages/politika-konfidencialnosti.htm @@ -8,8 +8,11 @@ localeTitle[en] = "Privacy policy" localeTitle[ru] = "Политика конфиденциальности" localeUrl[en] = "/privacy-policy" localeUrl[ru] = "/politika-konfidencialnosti" -== +[session] +security = "user" +redirect = "vojti" +==
diff --git a/themes/birzha/pages/reset-password.htm b/themes/birzha/pages/reset-password.htm index 78915349c..a79905b90 100644 --- a/themes/birzha/pages/reset-password.htm +++ b/themes/birzha/pages/reset-password.htm @@ -1,6 +1,6 @@ title = "Açar çalyşmak" url = "/password-reset" -layout = "default" +layout = "account" is_hidden = 0 [viewBag] diff --git a/themes/birzha/pages/search.htm b/themes/birzha/pages/search.htm index b3de8f320..242f2521a 100644 --- a/themes/birzha/pages/search.htm +++ b/themes/birzha/pages/search.htm @@ -7,6 +7,10 @@ is_hidden = 0 localeTitle[en] = "Search results" localeTitle[ru] = "Результаты поиска" +[session] +security = "user" +redirect = "vojti" + [searchResults] resultsPerPage = 3 showProviderBadge = 1 diff --git a/themes/birzha/pages/terms.htm b/themes/birzha/pages/terms.htm index 21c6f5762..bbd82ffae 100644 --- a/themes/birzha/pages/terms.htm +++ b/themes/birzha/pages/terms.htm @@ -8,6 +8,10 @@ localeTitle[en] = "Trade terms" localeTitle[ru] = "Условия торгов" localeUrl[en] = "/trade-terms" localeUrl[ru] = "/uslovia-torgov" + +[session] +security = "user" +redirect = "vojti" == +
+
+
+
+
+
+ + {{ 'topnav.login'|_ }} +
+ {% if canRegister %} +
+ + {{ 'topnav.reg'|_ }} +
+ {% endif %} +
+
+ +
+ {{ short_name }} +
+
+ {{ 'site.name'|_ }} +
+ +
+ {% if canRegister %} +
+ {% component 'account' view = 'signup'%} +
+ {% endif %} +
+ {% component 'account' view = 'signin'%} + +
+ +
+
+
+
+ \ No newline at end of file