diff --git a/addons/default/visiosoft/advs-module/resources/js/list.js b/addons/default/visiosoft/advs-module/resources/js/list.js
index 2311ecba7..81e4ce8f8 100644
--- a/addons/default/visiosoft/advs-module/resources/js/list.js
+++ b/addons/default/visiosoft/advs-module/resources/js/list.js
@@ -179,6 +179,7 @@ $(document).ready(function () {
});
$("#listFilterForm").submit(function(e) {
+ // Disable unselected inputs
const inputs = $('#listFilterForm :input');
[...inputs].forEach((input) => {
if (input.type === 'checkbox' || input.type === 'radio') {
@@ -191,6 +192,11 @@ $("#listFilterForm").submit(function(e) {
}
}
});
+
+ // Disable country if city is selected
+ if ($('#listCityFilter').val()) {
+ $('#listCountryFilter').prop('disabled', true)
+ }
});
// Change view type
diff --git a/addons/default/visiosoft/advs-module/resources/lang/tr/field.php b/addons/default/visiosoft/advs-module/resources/lang/tr/field.php
index 182ed9036..c5032dbdd 100644
--- a/addons/default/visiosoft/advs-module/resources/lang/tr/field.php
+++ b/addons/default/visiosoft/advs-module/resources/lang/tr/field.php
@@ -307,6 +307,7 @@ return [
'listing_details' => 'Liste Ayrıntıları',
'preview' => 'Ön İzleme',
'congratulations' => 'Tebrikler',
+ 'ad_desc' => 'İlan Açıklaması',
'free' => 'Bedava',
'ad_date' => 'İlan Tarihi',
diff --git a/addons/default/visiosoft/advs-module/resources/lang/tr/message.php b/addons/default/visiosoft/advs-module/resources/lang/tr/message.php
index c3f2b06b2..6cbc77cb4 100644
--- a/addons/default/visiosoft/advs-module/resources/lang/tr/message.php
+++ b/addons/default/visiosoft/advs-module/resources/lang/tr/message.php
@@ -27,4 +27,6 @@ return [
'ad_doesnt_exist' => "Bu İlan mevcut değil!",
'select_location_error' => "Lütfen haritada bir yer seçin!",
'this_ad_is_not_valid_anymore' => "Bu ürün veya ilan artık geçerli değil!",
+ 'approve_status_change' => "İlanınızın Durumu Etkin Olarak Ayarlandı!",
+ 'passive_status_change' => "İlanınızın Durumu Pasif Olarak Ayarlandı!",
];
diff --git a/addons/default/visiosoft/advs-module/resources/views/new-ad/new-create.twig b/addons/default/visiosoft/advs-module/resources/views/new-ad/new-create.twig
index dfc591859..5cf2e8341 100644
--- a/addons/default/visiosoft/advs-module/resources/views/new-ad/new-create.twig
+++ b/addons/default/visiosoft/advs-module/resources/views/new-ad/new-create.twig
@@ -169,7 +169,9 @@
-
{{ trans('visiosoft.module.advs::field.upload_photos') }}
+
+ {{ trans('visiosoft.module.advs::field.upload_photos') }}
+
-
- {{ trans('visiosoft.module.advs::field.additional_fields') }}
-
-
- {{ addBlock('new-ad/other-fields',{'custom_fields':custom_fields})|raw }}
-
+ {% if count(custom_fields) %}
+
+ {{ trans('visiosoft.module.advs::field.additional_fields') }}
+
+
+ {{ addBlock('new-ad/other-fields',{'custom_fields':custom_fields})|raw }}
+
+ {% endif %}
{{ trans('visiosoft.module.advs::field.ad_location') }}
diff --git a/addons/default/visiosoft/location-module/resources/js/settings.js b/addons/default/visiosoft/location-module/resources/js/settings.js
index 04f0c34a9..2144e5374 100644
--- a/addons/default/visiosoft/location-module/resources/js/settings.js
+++ b/addons/default/visiosoft/location-module/resources/js/settings.js
@@ -32,7 +32,7 @@ new Promise(function (resolve, reject) {
function getCities(country) {
crudAjax('id=' + country, '/ajax/getCities', 'POST', function (callback) {
cities = callback;
- $('select[name="default_city"]').html("");
+ $('select[name="default_city"]').html("");
$.each(cities, function (index, value) {
$('select[name="default_city"]').append("");
});
@@ -42,7 +42,7 @@ function getCities(country) {
function getDistricts(city) {
crudAjax('id=' + city, '/ajax/getDistricts', 'POST', function (callback) {
cities = callback;
- $('select[name="default_district"]').html("");
+ $('select[name="default_district"]').html("");
$.each(cities, function (index, value) {
$('select[name="default_district"]').append("");
});
@@ -52,7 +52,7 @@ function getDistricts(city) {
function getNeighborhoods(district) {
crudAjax('id=' + district, '/ajax/getNeighborhoods', 'POST', function (callback) {
cities = callback;
- $('select[name="default_neighborhood"]').html("");
+ $('select[name="default_neighborhood"]').html("");
$.each(cities, function (index, value) {
$('select[name="default_neighborhood"]').append("");
});
diff --git a/addons/default/visiosoft/location-module/resources/views/ads-list/partials/location-fields.twig b/addons/default/visiosoft/location-module/resources/views/ads-list/partials/location-fields.twig
index 9ab07408c..ab25ac2ce 100644
--- a/addons/default/visiosoft/location-module/resources/views/ads-list/partials/location-fields.twig
+++ b/addons/default/visiosoft/location-module/resources/views/ads-list/partials/location-fields.twig
@@ -21,7 +21,8 @@
-
+
@@ -45,7 +46,7 @@
{{ selected_cities_name|join(',') }}
-
diff --git a/addons/default/visiosoft/profile-module/resources/assets/js/country.js b/addons/default/visiosoft/profile-module/resources/assets/js/country.js
index bde79bc7a..e42bf6dcc 100644
--- a/addons/default/visiosoft/profile-module/resources/assets/js/country.js
+++ b/addons/default/visiosoft/profile-module/resources/assets/js/country.js
@@ -73,7 +73,7 @@ function Locations(cat, level, name){
url: "/class/ajax",
success: function(msg){
$('select[name="'+name+'"]').find('option').remove();
- $('select[name="'+name+'"]').append('
');
+ $('select[name="'+name+'"]').append('
');
$.each(msg, function(key, value){
$('select[name="'+name+'"]').append('
');
});
diff --git a/addons/default/visiosoft/profile-module/resources/lang/en/field.php b/addons/default/visiosoft/profile-module/resources/lang/en/field.php
index 2f577d9ae..12092bfb3 100644
--- a/addons/default/visiosoft/profile-module/resources/lang/en/field.php
+++ b/addons/default/visiosoft/profile-module/resources/lang/en/field.php
@@ -375,6 +375,9 @@ return [
'password' => [
'name' => 'Password',
],
+ 'old_password' => [
+ 'name' => 'Old password',
+ ],
'new_password' => [
'name' => 'New password',
],
diff --git a/addons/default/visiosoft/profile-module/resources/lang/en/message.php b/addons/default/visiosoft/profile-module/resources/lang/en/message.php
index fbd74ccb0..01da8faa1 100644
--- a/addons/default/visiosoft/profile-module/resources/lang/en/message.php
+++ b/addons/default/visiosoft/profile-module/resources/lang/en/message.php
@@ -29,6 +29,7 @@ return [
'empty_password_sms_message' => 'Due to security issues, we changed your password! Your new password is:',
'required_all' => "All Field is Required!",
'can_not_remove_filled_fields' => "You can not remove filled fields!",
+ 'wrong_password' => "The password you entered is not correct!",
// Forgot Password
'email_phone_not_found' => 'The E-mail, Phone Number is not correct!',
diff --git a/addons/default/visiosoft/profile-module/resources/views/profile/detail.twig b/addons/default/visiosoft/profile-module/resources/views/profile/detail.twig
index c84551599..2f649fb22 100644
--- a/addons/default/visiosoft/profile-module/resources/views/profile/detail.twig
+++ b/addons/default/visiosoft/profile-module/resources/views/profile/detail.twig
@@ -236,6 +236,12 @@
{{ passwordForm.open()|raw }}
+
+
+
+ {{ passwordForm.fields.old_password.input|raw }}
+
+
diff --git a/addons/default/visiosoft/profile-module/src/Profile/Password/PasswordFormBuilder.php b/addons/default/visiosoft/profile-module/src/Profile/Password/PasswordFormBuilder.php
index 5f5578422..fe5ea5c1a 100644
--- a/addons/default/visiosoft/profile-module/src/Profile/Password/PasswordFormBuilder.php
+++ b/addons/default/visiosoft/profile-module/src/Profile/Password/PasswordFormBuilder.php
@@ -6,6 +6,13 @@ use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
class PasswordFormBuilder extends FormBuilder
{
protected $fields = [
+ 'old_password' => [
+ 'type' => 'anomaly.field_type.text',
+ 'required' => true,
+ 'config' => [
+ 'type' => 'password'
+ ],
+ ],
'new_password' => [
'type' => 'anomaly.field_type.text',
'required' => true,
diff --git a/addons/default/visiosoft/profile-module/src/Profile/Password/PasswordFormHandler.php b/addons/default/visiosoft/profile-module/src/Profile/Password/PasswordFormHandler.php
index ab88a1bd5..77b93ba91 100644
--- a/addons/default/visiosoft/profile-module/src/Profile/Password/PasswordFormHandler.php
+++ b/addons/default/visiosoft/profile-module/src/Profile/Password/PasswordFormHandler.php
@@ -4,6 +4,7 @@ use Anomaly\Streams\Platform\Message\MessageBag;
use Anomaly\UsersModule\User\User;
use Anomaly\UsersModule\User\UserPassword;
use Illuminate\Support\Facades\Auth;
+use Illuminate\Support\Facades\Hash;
class PasswordFormHandler
{
@@ -20,6 +21,11 @@ class PasswordFormHandler
return;
}
+ if (!Hash::check($builder->getPostValue('old_password'), \auth()->user()->password)) {
+ $messages->error(trans('visiosoft.module.profile::message.wrong_password'));
+ return redirect()->back();
+ }
+
if ($builder->getPostValue('new_password') != $builder->getPostValue('re_new_password')) {
$messages->error(trans('visiosoft.module.profile::message.password_do_not_match'));
return redirect()->back();