diff --git a/_config.yml b/_config.yml new file mode 100644 index 000000000..c4192631f --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-cayman \ No newline at end of file diff --git a/addons/default/visiosoft/advs-module/migrations/2018_09_25_211014_visiosoft.module.advs__create_advs_fields.php b/addons/default/visiosoft/advs-module/migrations/2018_09_25_211014_visiosoft.module.advs__create_advs_fields.php index 523a35a7b..e6e21a7c7 100644 --- a/addons/default/visiosoft/advs-module/migrations/2018_09_25_211014_visiosoft.module.advs__create_advs_fields.php +++ b/addons/default/visiosoft/advs-module/migrations/2018_09_25_211014_visiosoft.module.advs__create_advs_fields.php @@ -114,6 +114,11 @@ class VisiosoftModuleAdvsCreateAdvsFields extends Migration 'order' => 'anomaly.field_type.integer', 'price' => [ 'type' => 'visiosoft.field_type.decimal', + 'config' => [ + 'decimal' => 2, + 'separator' => '.', + 'point' => ',' + ], ], 'currency' => [ 'type' => 'anomaly.field_type.select', diff --git a/addons/default/visiosoft/advs-module/resources/config/settings/sections.php b/addons/default/visiosoft/advs-module/resources/config/settings/sections.php index fe5ceee54..afe2db15d 100644 --- a/addons/default/visiosoft/advs-module/resources/config/settings/sections.php +++ b/addons/default/visiosoft/advs-module/resources/config/settings/sections.php @@ -19,6 +19,7 @@ return [ 'fields' => [ 'latest-limit', 'auto_approve', + 'estimated_pending_time', 'default_published_time', 'default_adv_limit', 'default_GET', diff --git a/addons/default/visiosoft/advs-module/resources/config/settings/settings.php b/addons/default/visiosoft/advs-module/resources/config/settings/settings.php index 06ea54889..c63c27f0d 100644 --- a/addons/default/visiosoft/advs-module/resources/config/settings/settings.php +++ b/addons/default/visiosoft/advs-module/resources/config/settings/settings.php @@ -22,6 +22,12 @@ return [ 'default_value' => true, ], ], + 'estimated_pending_time' => [ + 'type' => 'anomaly.field_type.integer', + 'config' => [ + 'default_value' => 6, + ], + ], 'default_published_time' => [ 'type' => 'anomaly.field_type.integer', 'bind' => 'adv.default_published_time', diff --git a/addons/default/visiosoft/advs-module/resources/css/detail.css b/addons/default/visiosoft/advs-module/resources/css/detail.css index 1c215f428..d5f851b84 100644 --- a/addons/default/visiosoft/advs-module/resources/css/detail.css +++ b/addons/default/visiosoft/advs-module/resources/css/detail.css @@ -1,4 +1,16 @@ .ad-detail-tabs .nav-link.active { background-color: #FFC106 !important; border-color: #ffc107 #ffc107 #ffc107; +} + +/* Pending screen */ +.pending-screen { + background-color: #f2f2f2; + color: #b31901; +} +.pending-screen img { + height: 7em; +} +.pending-screen p { + font-weight: 500; } \ No newline at end of file diff --git a/addons/default/visiosoft/advs-module/resources/css/dropleft-edit.css b/addons/default/visiosoft/advs-module/resources/css/dropleft-edit.css index af5f24123..db1b38e2a 100644 --- a/addons/default/visiosoft/advs-module/resources/css/dropleft-edit.css +++ b/addons/default/visiosoft/advs-module/resources/css/dropleft-edit.css @@ -1,6 +1,6 @@ .dropleft-edit { right: 0; - top: 50%; + top: 40%; } .dropleft-edit button { transform: rotate(-90deg) translate(0, -100%); diff --git a/addons/default/visiosoft/advs-module/resources/images/alarm.png b/addons/default/visiosoft/advs-module/resources/images/alarm.png new file mode 100644 index 000000000..201e9344f Binary files /dev/null and b/addons/default/visiosoft/advs-module/resources/images/alarm.png differ diff --git a/addons/default/visiosoft/advs-module/resources/js/cats.js b/addons/default/visiosoft/advs-module/resources/js/cats.js index 41d28a71d..c489f8cf7 100644 --- a/addons/default/visiosoft/advs-module/resources/js/cats.js +++ b/addons/default/visiosoft/advs-module/resources/js/cats.js @@ -7,11 +7,12 @@ function hideLoader() { } $(document).ready(function () { - $('select[name="cat1"], select[name="cat2"], select[name="cat3"], ' + - 'select[name="cat4"], select[name="cat5"], select[name="cat6"], select[name="cat7"]').on('change', function () { + $('select[name="cat1"], select[name="cat2"], select[name="cat3"], select[name="cat4"], select[name="cat5"], ' + + 'select[name="cat6"], select[name="cat7"], select[name="cat8"], select[name="cat9"], select[name="cat10"]') + .on('change', function () { var all = $(this).val(); $(this).val(all[all.length-1]) - }) + }); var filter = {}; filter.getCats = (catId, divId) => { @@ -19,11 +20,10 @@ $(document).ready(function () { type: 'get', url: '/class/getcats/'+ divId, success: function (response) { - hideLoader() + hideLoader(); if(response['title'] != undefined){ var btn = '' - if(response['link'] != "") - { + if(response['link'] != "") { btn = ""+response['nextBtn']+""; } $('.cat-item-3').html( @@ -51,7 +51,7 @@ $(document).ready(function () { filter.hideCats = (num) => { var startNo = num; - var endNo = 6; + var endNo = 9; while (startNo <= endNo) { $('#cat'+ startNo).html("").closest('.cat-item-2').hide(); @@ -60,7 +60,7 @@ $(document).ready(function () { } }; - for (var i = 1; i <= 6; i++) { + for (var i = 1; i <= 10; i++) { (function(){ var ii = i; $('#cat'+i).on('change', function (i,e) { @@ -73,5 +73,4 @@ $(document).ready(function () { }); })(); } - }); diff --git a/addons/default/visiosoft/advs-module/resources/lang/ar/button.php b/addons/default/visiosoft/advs-module/resources/lang/ar/button.php index c28a8746f..deefe14e0 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/ar/button.php +++ b/addons/default/visiosoft/advs-module/resources/lang/ar/button.php @@ -8,10 +8,12 @@ return [ 'new_district' => 'حي جديد', 'new_neighborhood' => 'حي جديد', 'new_village' => 'قرية جديدة', + 'edit' => "تعديل", 'approve' => "يوافق", 'decline' => 'انخفاض', 'extend' => 'تمديد', 'extend_all' => 'تمديد الكل', + 'categories' => 'التصنيفات', 'sub_category' => 'الفئات الفرعية', 'add_sub_category' => 'إضافة فئة فرعية', 'sub_cities' => 'مدن فرعية', @@ -23,6 +25,7 @@ return [ 'sub_neighborhoods' => 'الأحياء الفرعية', 'sub_village' => 'قرية فرعية', 'general_settings' => 'الاعدادات العامة', + 'save_category' => 'حفظ الفئة', 'update_category' => [ 'name' => 'تحديث الفئة' ], diff --git a/addons/default/visiosoft/advs-module/resources/lang/ar/field.php b/addons/default/visiosoft/advs-module/resources/lang/ar/field.php index 8c6955458..43861c9e5 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/ar/field.php +++ b/addons/default/visiosoft/advs-module/resources/lang/ar/field.php @@ -95,9 +95,6 @@ return [ 'pending_adv' => [ 'name' => 'اعلانات معلقة' ], - 'archived_adv' => [ - 'name' => 'الإعلانات المؤرشفة' - ], 'finish_at' => [ 'name' => 'ينتهي عند' ], @@ -126,6 +123,8 @@ return [ 'list-page' => 'قائمة الصفحة', 'search' => 'بحث', 'recommended' => 'الإعلانات الموصى بها لك', + 'filter' => 'منقي', + 'sort' => 'فرز', 'sort_by' => 'ترتيب حسب', 'pick_option' => 'اختيار خيار', 'pick_ordering' => 'تنظيم', @@ -236,6 +235,7 @@ return [ 'name' => 'بيعت كلها', ], 'edit_category' => 'تحرير الفئة', + 'set_category' => 'حدد الفئة', 'max' => [ 'name' => 'ماكس', ], @@ -263,4 +263,12 @@ return [ "no_location" => "لا يوجد موقع محدد.", "continue" => 'استمر', "gallery" => 'صالة عرض', + + // Pending screen + 'pending_message_1' => 'الإعلان قيد عملية الموافقة', + 'pending_message_2' => "تاريخ تحديث الإعلان", + 'pending_message_3' => 'وقت الانتظار المقدر', + 'pending_message_4' => 'سيتم إضافة الوقت المستغرق في عملية الموافقة إلى وقت تناول المنشطات.', + 'pending_message_5' => 'لا يمكن إجراء معاملات من مركز الاتصال بخصوص الإعلان في عملية الموافقة.', + 'hours' => 'ساعات' ]; diff --git a/addons/default/visiosoft/advs-module/resources/lang/ar/message.php b/addons/default/visiosoft/advs-module/resources/lang/ar/message.php index c3860c45d..1ccaff0c4 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/ar/message.php +++ b/addons/default/visiosoft/advs-module/resources/lang/ar/message.php @@ -27,4 +27,5 @@ return [ 'success_delete' => 'تم حذف الإعلان', 'pending_ad_status' => 'إعلانك في انتظار موافقة المحرر.', 'extended' => ': تم تمديد عدد الإعلانات بنجاح.', + 'category_not_exist' => 'هذه الفئة لم تعد موجودة!', ]; diff --git a/addons/default/visiosoft/advs-module/resources/lang/ar/setting.php b/addons/default/visiosoft/advs-module/resources/lang/ar/setting.php index d195d4957..667c48e77 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/ar/setting.php +++ b/addons/default/visiosoft/advs-module/resources/lang/ar/setting.php @@ -4,6 +4,10 @@ return [ 'auto_approve' => [ 'name' => 'الموافقة التلقائية', ], + 'estimated_pending_time' => [ + 'name' => 'الوقت المعلق المقدر', + 'instructions' => 'في ساعات', + ], 'default_published_time' => [ 'name' => 'وقت النشر الافتراضي', ], diff --git a/addons/default/visiosoft/advs-module/resources/lang/en/field.php b/addons/default/visiosoft/advs-module/resources/lang/en/field.php index 08aa17502..771236d5a 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/en/field.php +++ b/addons/default/visiosoft/advs-module/resources/lang/en/field.php @@ -263,4 +263,12 @@ return [ "no_location" => "No location is selected.", "continue" => 'Continue', "gallery" => 'Gallery', + + // Pending screen + 'pending_message_1' => 'The Ad is in the Approval Process', + 'pending_message_2' => "Ad's Update Date", + 'pending_message_3' => 'Estimated Waiting Time', + 'pending_message_4' => 'The time spent in the approval process will be added to the doping time.', + 'pending_message_5' => 'No transactions can be made from the call center regarding the ad in the approval process.', + 'hours' => 'hours' ]; diff --git a/addons/default/visiosoft/advs-module/resources/lang/en/setting.php b/addons/default/visiosoft/advs-module/resources/lang/en/setting.php index 2fff9dccd..0ae1ae9a5 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/en/setting.php +++ b/addons/default/visiosoft/advs-module/resources/lang/en/setting.php @@ -4,6 +4,10 @@ return [ 'auto_approve' => [ 'name' => 'Auto Approve', ], + 'estimated_pending_time' => [ + 'name' => 'Estimated Pending Time', + 'instructions' => 'In Hours', + ], 'default_published_time' => [ 'name' => 'Default Publish Time', ], diff --git a/addons/default/visiosoft/advs-module/resources/lang/ru/button.php b/addons/default/visiosoft/advs-module/resources/lang/ru/button.php index e54f23f93..d5189b82d 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/ru/button.php +++ b/addons/default/visiosoft/advs-module/resources/lang/ru/button.php @@ -8,10 +8,12 @@ return [ 'new_district' => 'Новый Район', 'new_neighborhood' => 'Новый район', 'new_village' => 'Новая Деревня', + 'edit' => "редактировать", 'approve' => "Утвердить", 'decline' => 'снижение', 'extend' => 'простираться', 'extend_all' => 'Расширить все', + 'categories' => 'категории', 'sub_category' => 'Подкатегории', 'add_sub_category' => 'Добавить подкатегорию', 'sub_cities' => 'Подгорода', @@ -23,6 +25,7 @@ return [ 'sub_neighborhoods' => 'Суб соседства', 'sub_village' => 'Sub Village', 'general_settings' => 'общие настройки', + 'save_category' => 'Сохранить категорию', 'update_category' => [ 'name' => 'Обновить категорию' ], diff --git a/addons/default/visiosoft/advs-module/resources/lang/ru/field.php b/addons/default/visiosoft/advs-module/resources/lang/ru/field.php index 11ded5a15..5487899c8 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/ru/field.php +++ b/addons/default/visiosoft/advs-module/resources/lang/ru/field.php @@ -95,9 +95,6 @@ return [ 'pending_adv' => [ 'name' => 'Ожидающие объявления' ], - 'archived_adv' => [ - 'name' => 'Архивные объявления' - ], 'finish_at' => [ 'name' => 'Закончить в' ], @@ -126,6 +123,8 @@ return [ 'list-page' => 'Страница списка', 'search' => 'Поиск', 'recommended' => 'Рекомендуемые объявления для вас', + 'filter' => 'Фильтр', + 'sort' => 'Сортировать', 'sort_by' => 'Сортировать по', 'pick_option' => 'Выберите опцию', 'pick_ordering' => 'заказ', @@ -237,6 +236,7 @@ return [ 'name' => 'Продано', ], 'edit_category' => 'Изменить категорию', + 'set_category' => 'Установить категорию', 'max' => [ 'name' => 'Максимум', ], @@ -264,4 +264,12 @@ return [ "no_location" => "Местоположение не выбрано.", "continue" => 'Продолжить', "gallery" => 'Галерея', + + // Pending screen + 'pending_message_1' => 'Объявление находится в процессе одобрения', + 'pending_message_2' => "Дата обновления объявления", + 'pending_message_3' => 'Расчетное время ожидания', + 'pending_message_4' => 'Время, потраченное на процесс утверждения, будет добавлено к времени допинга.', + 'pending_message_5' => 'Никакие транзакции не могут быть сделаны из колл-центра относительно объявления в процессе одобрения.', + 'hours' => 'часов' ]; diff --git a/addons/default/visiosoft/advs-module/resources/lang/ru/message.php b/addons/default/visiosoft/advs-module/resources/lang/ru/message.php index 670201318..ba2b9674a 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/ru/message.php +++ b/addons/default/visiosoft/advs-module/resources/lang/ru/message.php @@ -28,4 +28,5 @@ return [ 'success_delete' => 'Объявление удалено', 'pending_ad_status' => 'Ваше объявление ожидает одобрения редактором.', 'extended' => ': количество объявлений было успешно продлено.', + 'category_not_exist' => 'Эта категория больше не существует!', ]; diff --git a/addons/default/visiosoft/advs-module/resources/lang/ru/setting.php b/addons/default/visiosoft/advs-module/resources/lang/ru/setting.php index 8033b8f0c..0ced0829f 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/ru/setting.php +++ b/addons/default/visiosoft/advs-module/resources/lang/ru/setting.php @@ -4,6 +4,10 @@ return [ 'auto_approve' => [ 'name' => 'Авто Одобрить', ], + 'estimated_pending_time' => [ + 'name' => 'Расчетное время ожидания', + 'instructions' => 'В часах', + ], 'default_published_time' => [ 'name' => 'Время публикации по умолчанию', ], diff --git a/addons/default/visiosoft/advs-module/resources/lang/sq/button.php b/addons/default/visiosoft/advs-module/resources/lang/sq/button.php index adeb3fc76..577e5a686 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/sq/button.php +++ b/addons/default/visiosoft/advs-module/resources/lang/sq/button.php @@ -8,10 +8,12 @@ return [ 'new_district' => 'Rrethi i Ri', 'new_neighborhood' => 'Lagjja e re', 'new_village' => 'Fshati i Ri', + 'edit' => "redaktoj", 'approve' => "miratoj", 'decline' => 'rënie', 'extend' => 'shpreh', 'extend_all' => 'Zgjeroni të gjitha', + 'categories' => 'Kategoritë', 'sub_category' => 'Nënkategoritë', 'add_sub_category' => 'Shtoni Nën Kategorinë', 'sub_cities' => 'Qytetet nën-qytet', @@ -23,6 +25,7 @@ return [ 'sub_neighborhoods' => 'Nën lagjet', 'sub_village' => 'Nën fshat', 'general_settings' => 'Cilësimet e përgjithshme', + 'save_category' => 'Ruaj kategorinë', 'update_category' => [ 'name' => 'Kategoria e azhurnuar' ], diff --git a/addons/default/visiosoft/advs-module/resources/lang/sq/field.php b/addons/default/visiosoft/advs-module/resources/lang/sq/field.php index 63ac8e19c..aef0f646c 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/sq/field.php +++ b/addons/default/visiosoft/advs-module/resources/lang/sq/field.php @@ -95,9 +95,6 @@ return [ 'pending_adv' => [ 'name' => 'Në pritje të reklamave' ], - 'archived_adv' => [ - 'name' => 'Reklama të arkivuara' - ], 'finish_at' => [ 'name' => 'Mbaro At' ], @@ -126,6 +123,8 @@ return [ 'list-page' => 'Faqja e listës', 'search' => 'Kërko', 'recommended' => 'Reklama të rekomanduara për ju', + 'filter' => 'filtër', + 'sort' => 'lloj', 'sort_by' => 'Ndaj sipas', 'pick_option' => 'Zgjidh një mundësi', 'pick_ordering' => 'renditje', @@ -236,6 +235,7 @@ return [ 'name' => 'E shitur', ], 'edit_category' => 'Ndrysho kategorinë', + 'set_category' => 'Vendosni Kategorinë', 'max' => [ 'name' => 'Max', ], @@ -263,4 +263,12 @@ return [ "no_location" => "Asnjë vendndodhje nuk është zgjedhur.", "continue" => 'vazhdoj', "gallery" => 'Galeri', + + // Pending screen + 'pending_message_1' => 'Shpallja është në Procesin e Miratimit', + 'pending_message_2' => "Data e azhurnimit të reklamës", + 'pending_message_3' => 'Koha e parashikuar e pritjes', + 'pending_message_4' => 'Koha e kaluar në procesin e miratimit do t\'i shtohet kohës së dopingut.', + 'pending_message_5' => 'Asnjë transaksion nuk mund të bëhet nga qendra e thirrjeve në lidhje me reklamën në procesin e miratimit.', + 'hours' => 'orë' ]; diff --git a/addons/default/visiosoft/advs-module/resources/lang/sq/message.php b/addons/default/visiosoft/advs-module/resources/lang/sq/message.php index 0af43331b..ae28ac38b 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/sq/message.php +++ b/addons/default/visiosoft/advs-module/resources/lang/sq/message.php @@ -27,4 +27,5 @@ return [ 'success_delete' => 'Shpallja është fshirë', 'pending_ad_status' => 'Reklama juaj është në pritje të aprovimit nga Redaktori.', 'extended' => ': reklamat e numrave janë zgjeruar me sukses.', + 'category_not_exist' => 'Kjo kategori nuk ekziston më!', ]; diff --git a/addons/default/visiosoft/advs-module/resources/lang/sq/setting.php b/addons/default/visiosoft/advs-module/resources/lang/sq/setting.php index 1024c72d8..24b09a976 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/sq/setting.php +++ b/addons/default/visiosoft/advs-module/resources/lang/sq/setting.php @@ -4,6 +4,10 @@ return [ 'auto_approve' => [ 'name' => 'Miratimi automatik', ], + 'estimated_pending_time' => [ + 'name' => 'Koha e parashikuar e pritjes', + 'instructions' => 'Në Orë', + ], 'default_published_time' => [ 'name' => 'Koha e publikimit të paracaktuar', ], diff --git a/addons/default/visiosoft/advs-module/resources/lang/tr/button.php b/addons/default/visiosoft/advs-module/resources/lang/tr/button.php index 3ed36c834..b24f9c6d7 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/tr/button.php +++ b/addons/default/visiosoft/advs-module/resources/lang/tr/button.php @@ -8,10 +8,12 @@ return [ 'new_district' => 'Yeni bölge', 'new_neighborhood' => 'Yeni mahalle', 'new_village' => 'Yeni köy', + 'edit' => "Düzenle", 'approve' => "Onayla", 'decline' => 'Reddet', 'extend' => 'Uzat', 'extend_all' => 'Tümünün Tarihini Güncelle', + 'categories' => 'Kategoriler', 'sub_category' => 'Alt Kategoriler', 'add_sub_category' => 'Alt Kategori Ekle', 'sub_cities' => 'Alt Şehirler', @@ -23,6 +25,7 @@ return [ 'sub_neighborhoods' => 'Alt Mahalleler', 'sub_village' => 'Alt Köy', 'general_settings' => 'Genel Ayarlar', + 'save_category' => 'Kategoriyi Kaydet', 'update_category' => [ 'name' => 'Kategori Güncelle' ], 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 1e11cb95e..b64f900e9 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/tr/field.php +++ b/addons/default/visiosoft/advs-module/resources/lang/tr/field.php @@ -123,6 +123,8 @@ return [ 'list-page' => 'Liste Sayfası', 'search' => 'Arama', 'recommended' => 'Sizin için Önerilen İlanlar', + 'filter' => 'filtre', + 'sort' => 'Çeşit', 'sort_by' => 'Sırala', 'pick_option' => 'Bir seçenek seçin', 'pick_ordering' => 'Sıralama Seç', @@ -235,6 +237,7 @@ return [ 'name' => 'Tükendi', ], 'edit_category' => 'Kategori Düzenle', + 'set_category' => 'Kategoriyi Ayarla', 'max' => [ 'name' => 'Maksimum', ], @@ -262,4 +265,12 @@ return [ "no_location" => "Lokasyon eklenmemiş.", "continue" => 'Devam Et', "gallery" => 'Galeri', + + // Pending screen + 'pending_message_1' => 'Reklam Onay Sürecinde', + 'pending_message_2' => "Reklamın Güncelleme Tarihi", + 'pending_message_3' => 'Tahmini Bekleme Süresi', + 'pending_message_4' => 'Onay sürecinde geçirilen süre doping zamanına eklenecektir.', + 'pending_message_5' => 'Onay sürecinde reklamla ilgili çağrı merkezinden hiçbir işlem yapılamaz.', + 'hours' => 'saatler' ]; 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 f2d920575..c4b6ada1e 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,5 @@ return [ 'success_delete' => 'İlan Silindi', 'pending_ad_status' => 'İlanınız Editör tarafından onay beklemektedir.', 'extended' => ':number ilan süresi uzatıldı.', + 'category_not_exist' => 'Bu kategori artık mevcut değil!', ]; diff --git a/addons/default/visiosoft/advs-module/resources/lang/tr/setting.php b/addons/default/visiosoft/advs-module/resources/lang/tr/setting.php index 5450ac6ce..d2e86ca87 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/tr/setting.php +++ b/addons/default/visiosoft/advs-module/resources/lang/tr/setting.php @@ -4,6 +4,10 @@ return [ 'auto_approve' => [ 'name' => 'Otomatik Onaylama', ], + 'estimated_pending_time' => [ + 'name' => 'Tahmini Bekleme Süresi', + 'instructions' => 'Saatlerde', + ], 'default_published_time' => [ 'name' => 'Varsayılan Yayın Süresi', ], diff --git a/addons/default/visiosoft/advs-module/resources/views/ad-detail/partials/ad-status.twig b/addons/default/visiosoft/advs-module/resources/views/ad-detail/partials/ad-status.twig index c9ce0ce4c..94bfbc751 100644 --- a/addons/default/visiosoft/advs-module/resources/views/ad-detail/partials/ad-status.twig +++ b/addons/default/visiosoft/advs-module/resources/views/ad-detail/partials/ad-status.twig @@ -1,6 +1,19 @@ {% if adv.status == "pending_user" or adv.status == "pending_admin" %} -
- - {{ trans('visiosoft.module.advs::message.pending_ad_status') }} -
+
+ pending icon +
{{ trans('visiosoft.module.advs::field.pending_message_1') }}
+
+
{{ trans('visiosoft.module.advs::field.pending_message_2') }}
+
: {{ adv.updated_at|date('d M Y H:i') }}
+
+
+
{{ trans('visiosoft.module.advs::field.pending_message_3') }}
+
+ : {{ setting_value('visiosoft.module.advs::estimated_pending_time') }} {{ trans('visiosoft.module.advs::field.hours') }} +
+
+ +

{{ trans('visiosoft.module.advs::field.pending_message_4') }}

+

{{ trans('visiosoft.module.advs::field.pending_message_5') }}

+
{% endif %} \ No newline at end of file diff --git a/addons/default/visiosoft/advs-module/resources/views/list/partials/list-filter.twig b/addons/default/visiosoft/advs-module/resources/views/list/partials/list-filter.twig index 00ed64d4c..588db4357 100644 --- a/addons/default/visiosoft/advs-module/resources/views/list/partials/list-filter.twig +++ b/addons/default/visiosoft/advs-module/resources/views/list/partials/list-filter.twig @@ -1,188 +1,188 @@ {% set formHtml %} -
- {% endset %} - {% if 'cat' in param|keys %} + +{% endset %} +{% if 'cat' in param|keys %} {% if not param['cat'] is empty %} - {% set catId = entries('cats', 'category').find(param['cat']) %} - {% set cityId = null %} - {% if 'city' in param|keys %} - {% set citiesArray = param['city'][0]|split(',') %} - {% if count(citiesArray) is same as(1) %} - {% set cityId = entries('location', 'cities').find(param['city'][0]) %} + {% set catId = entries('cats', 'category').find(param['cat']) %} + {% set cityId = null %} + {% if 'city' in param|keys %} + {% set citiesArray = param['city'][0]|split(',') %} + {% if count(citiesArray) is same as(1) %} + {% set cityId = entries('location', 'cities').find(param['city'][0]) %} + {% endif %} {% endif %} - {% endif %} - {% set formHtml %} - + {% set formHtml %} + {% endset %} - {% endif %} - {% endif %} - {{ formHtml }} -
- - -
-
-
+ {% endif %} +{% endif %} +{{ formHtml }} +
+ + +
+
+
- {{ addBlock('ads-list/partials/list-filter',{ - 'mainCats':mainCats, - 'subCats':subCats, - 'ranges':ranges, - 'checkboxes':checkboxes, - 'topfields' : topfields, - 'radio':radio, - 'countries':countries, - 'cities':cities, - 'districts':districts, - 'neighborhoods':neighborhoods, - 'villages':villages, - 'param':param - })|raw }} + {{ addBlock('ads-list/partials/list-filter',{ + 'mainCats':mainCats, + 'subCats':subCats, + 'ranges':ranges, + 'checkboxes':checkboxes, + 'topfields' : topfields, + 'radio':radio, + 'countries':countries, + 'cities':cities, + 'districts':districts, + 'neighborhoods':neighborhoods, + 'villages':villages, + 'param':param + })|raw }} - - {% include 'visiosoft.module.advs::list/partials/price-filter' %} - + + {% include 'visiosoft.module.advs::list/partials/price-filter' %} + - -
- -
-
-
- - -
-
- - -
-
- - -
-
-
+ +
+ - - - -
- -
-
-
- +
+
+ - -
-
- - -
+ type="radio" name="date" id="dateDay" + value="day"> + +
+
+ + +
+
+ +
- +
+ - -
- -
-
-
- - -
+ +
+ +
+
+
+ + +
+
+ +
- +
+ -
-
-
- -
+ +
+ +
+
+
+ + +
+ + +
+
+
+ +
+
+
- \ No newline at end of file +
+ \ No newline at end of file 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 d4dac3d87..a3daf68f8 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 @@ -32,6 +32,9 @@ + + +
diff --git a/addons/default/visiosoft/advs-module/resources/views/new-ad/post-cat.twig b/addons/default/visiosoft/advs-module/resources/views/new-ad/post-cat.twig index c39035865..2dd1f60ec 100644 --- a/addons/default/visiosoft/advs-module/resources/views/new-ad/post-cat.twig +++ b/addons/default/visiosoft/advs-module/resources/views/new-ad/post-cat.twig @@ -69,6 +69,30 @@
+
+
+
{{ trans('visiosoft.module.advs::field.select_a_sub_category') }}
+ +
+
+
+
+
{{ trans('visiosoft.module.advs::field.select_a_sub_category') }}
+ +
+
+
+
+
{{ trans('visiosoft.module.advs::field.select_a_sub_category') }}
+ +
+
diff --git a/addons/default/visiosoft/advs-module/src/Adv/Form/AdvFormBuilder.php b/addons/default/visiosoft/advs-module/src/Adv/Form/AdvFormBuilder.php index 623d88a6d..652a496e1 100644 --- a/addons/default/visiosoft/advs-module/src/Adv/Form/AdvFormBuilder.php +++ b/addons/default/visiosoft/advs-module/src/Adv/Form/AdvFormBuilder.php @@ -1,6 +1,5 @@ 'Visiosoft\AdvsModule\Http\Controller\advsController@getLocations', 'advs/main' => 'Visiosoft\AdvsModule\Http\Controller\advsController@advsMainPage', 'advs/adv/{id}' => [ - 'as' => 'adv_detail', + 'as' => 'adv_detail_backup', 'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@view' ], 'advs/adv/{id}/{seo}' => [ - 'as' => 'adv_detail_seo', + 'as' => 'adv_detail_seo_backup', 'uses' => 'Visiosoft\AdvsModule\Http\Controller\advsController@view' ], 'ad/{id}' => [ diff --git a/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php b/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php index 57fc649a1..4a4d018fe 100644 --- a/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php +++ b/addons/default/visiosoft/advs-module/src/Http/Controller/advsController.php @@ -319,7 +319,7 @@ class AdvsController extends PublicController $recommended_advs[$index] = $this->adv_model->AddAdsDefaultCoverImage($ad); } - for ($i = 1; $i < 7; $i++) { + for ($i = 1; $i <= 10; $i++) { $cat = "cat" . $i; if ($adv->$cat != null) { $item = $this->category_repository->getItem($adv->$cat); @@ -417,7 +417,6 @@ class AdvsController extends PublicController $count_user_ads = count($this->adv_model->userAdv()->get()); if (empty($cats->toArray())) { - $cats = trans('visiosoft.module.advs::message.create_ad_with_post_cat'); if (setting_value('visiosoft.module.advs::default_adv_limit') <= $count_user_ads) { @@ -433,8 +432,6 @@ class AdvsController extends PublicController return $msg; } } - - } return $cats; } @@ -504,8 +501,9 @@ class AdvsController extends PublicController if ($package != null) $this->messages->error(trans('visiosoft.module.advs::message.please_buy_package')); - } else + } else { $this->messages->error(trans('visiosoft.module.advs::message.max_ad_limit.title')); + } return redirect('/'); } @@ -540,7 +538,6 @@ class AdvsController extends PublicController app('Visiosoft\CustomfieldsModule\Http\Controller\cfController')->store($adv, $request); } - $form->render($request->update_id); $post = $form->getPostData(); $post['id'] = $request->update_id; @@ -577,7 +574,6 @@ class AdvsController extends PublicController $events->dispatch(new EditAd($request->update_id, $settings, $adv));//Update Notify } - if ($isActiveDopings) { return redirect(route('add_doping', [$request->update_id])); } else { @@ -615,7 +611,7 @@ class AdvsController extends PublicController $cat = 'cat'; $cats = array(); - for ($i = 1; $i < 7; $i++) { + for ($i = 1; $i <= 10; $i++) { if ($adv[$cat . $i] != null) { $name = $categoryRepository->getSingleCat($adv[$cat . $i]); if (!is_null($name)) { @@ -699,7 +695,6 @@ class AdvsController extends PublicController $main_cats = $this->category_repository->mainCats(); return $this->view->make('visiosoft.module.advs::new-ad/post-cat', compact('main_cats')); - } /** @@ -722,7 +717,7 @@ class AdvsController extends PublicController $params = $this->requestHttp->all(); unset($params['action']); - for ($i = 2; $i <= 7; $i++) { + for ($i = 2; $i <= 10; $i++) { if (!isset($params['cat' . $i])) { $params['cat' . $i] = NULL; } diff --git a/addons/default/visiosoft/base-theme/resources/css/forgot.css b/addons/default/visiosoft/base-theme/resources/css/forgot.css new file mode 100644 index 000000000..0e8bf74df --- /dev/null +++ b/addons/default/visiosoft/base-theme/resources/css/forgot.css @@ -0,0 +1,25 @@ +@media only screen and (min-width: 768px) { + .forgot-wrapper { + padding-top: 4em; + padding-bottom: 4em; + padding-left: 4.25em; + border: 1px solid #dee2e6!important; + } +} +@media only screen and (min-width: 768px) { + .forgot-form-wrapper { + width: 20em !important; + } +} +.forgot-img { + height: 11em; + width: 10em; +} +.forgot-wrapper label { + font-size: 14px; +} +@media only screen and (min-width: 768px) { + .forgot-form-wrapper button { + width: initial !important; + } +} \ No newline at end of file diff --git a/addons/default/visiosoft/base-theme/resources/css/login.css b/addons/default/visiosoft/base-theme/resources/css/login.css index cf3d89a08..49027249c 100644 --- a/addons/default/visiosoft/base-theme/resources/css/login.css +++ b/addons/default/visiosoft/base-theme/resources/css/login.css @@ -111,10 +111,9 @@ background: #fafafa; color: #489ae8; } - @media only screen and (min-width: 470px) { .login-section { - padding: 70px 78px 148px 77px; + padding: 70px 30px 148px; } .register-section { @@ -123,4 +122,9 @@ padding-right: 85px; background-color: #fff; } +} +@media only screen and (min-width: 1200px) { + .login-section { + padding: 70px 78px 148px 77px; + } } \ No newline at end of file diff --git a/addons/default/visiosoft/base-theme/resources/css/register.css b/addons/default/visiosoft/base-theme/resources/css/register.css index cbfd641bd..954390e8e 100644 --- a/addons/default/visiosoft/base-theme/resources/css/register.css +++ b/addons/default/visiosoft/base-theme/resources/css/register.css @@ -11,4 +11,19 @@ .personal-advantages img { max-height: 60px; max-width: 60px; +} + +.approved-phone { + background-color: #ebf2e5 !important; + border-color: #4a7c20 !important; +} + +.rejected-phone { + background-color: #f8e6e9 !important; + border-color: #ba7b84 !important; +} + +.phone-validation-error { + color: #c75050; + font-size: 14px; } \ No newline at end of file diff --git a/addons/default/visiosoft/base-theme/resources/images/forgot-password.png b/addons/default/visiosoft/base-theme/resources/images/forgot-password.png new file mode 100644 index 000000000..a68d244ee Binary files /dev/null and b/addons/default/visiosoft/base-theme/resources/images/forgot-password.png differ diff --git a/addons/default/visiosoft/base-theme/resources/js/register.js b/addons/default/visiosoft/base-theme/resources/js/register.js index b5b0d5572..5930e77f5 100644 --- a/addons/default/visiosoft/base-theme/resources/js/register.js +++ b/addons/default/visiosoft/base-theme/resources/js/register.js @@ -1 +1,48 @@ phoneMask("input[name='phone'],input[name='land_phone']"); + +// Phone register validation +//setup before functions +let typingTimer; +let doneTypingInterval = 650; +let phoneInput = $(".validate-phone input[name='phone']"); + +//on keyup, start the countdown +phoneInput.on('keyup', function () { + clearTimeout(typingTimer); + typingTimer = setTimeout(function () { + doneTyping(phoneInput.val()) + }, doneTypingInterval) +}); + +//on keydown, clear the countdown +phoneInput.on('keydown', function () { + clearTimeout(typingTimer); +}); + +function doneTyping(phoneNum) { + if (!phoneNum.includes('_') && phoneNum !== "") { + let countryCode = $(".iti__selected-flag").attr('title').split("+"); + countryCode = '+' + countryCode[countryCode.length - 1]; + + $.ajax({ + type: 'GET', + data: {'phoneNumber': countryCode + phoneNum.substr(1)}, + url: 'ajax/phone-validation', + success: function (response) { + if (response.userExists) { + phoneInput.addClass('rejected-phone'); + phoneInput.removeClass('approved-phone'); + $('.phone-validation-error').removeClass('d-none') + } else { + phoneInput.addClass('approved-phone'); + phoneInput.removeClass('rejected-phone'); + $('.phone-validation-error').addClass('d-none') + } + }, + }); + } else { + phoneInput.removeClass('approved-phone'); + phoneInput.removeClass('rejected-phone'); + $('.phone-validation-error').addClass('d-none') + } +} \ No newline at end of file diff --git a/addons/default/visiosoft/base-theme/resources/lang/ar/field.php b/addons/default/visiosoft/base-theme/resources/lang/ar/field.php index a97fd0621..7d9270817 100644 --- a/addons/default/visiosoft/base-theme/resources/lang/ar/field.php +++ b/addons/default/visiosoft/base-theme/resources/lang/ar/field.php @@ -30,4 +30,13 @@ return [ 'personal_registration_list_2' => 'أضف الإعلانات التي تهتم بها ، واتبع تغيرات الأسعار بعد إضافتها إلى مفضلاتك ، وإنشاء عمليات بحث مفضلة تلبي معاييرك ،', 'personal_registration_list_3' => 'أرسل رسائل إلى مالكي الإعلانات على الموقع.', 'register_information_note' => 'تؤخذ المعلومات على هذه الصفحة ل ' . env('APPLICATION_DOMAIN') . ' عضوية. يمكنك العثور على معلومات مفصلة حول حماية البيانات الشخصية هنا.', + + // Register page + 'phone_validation_error' => 'رقم الهاتف هذا قيد الاستخدام من قبل عضو آخر.', + + // Forgot Password + 'create_new_password' => 'إنشاء كلمة مرور جديدة', + + // Login page + 'or' => 'أو' ]; \ No newline at end of file diff --git a/addons/default/visiosoft/base-theme/resources/lang/en/field.php b/addons/default/visiosoft/base-theme/resources/lang/en/field.php index 4e1fb6920..14c442b87 100644 --- a/addons/default/visiosoft/base-theme/resources/lang/en/field.php +++ b/addons/default/visiosoft/base-theme/resources/lang/en/field.php @@ -30,4 +30,13 @@ return [ 'personal_registration_list_2' => 'Add the ads you are interested in, follow the price changes after adding them to your favorites, create favorite searches that meet your criteria,', 'personal_registration_list_3' => 'Send messages to the ad owners on the site.', 'register_information_note' => 'The information on this page is taken for ' . env('APPLICATION_DOMAIN') . ' membership. You can find detailed information about the protection of personal data here.', + + // Register page + 'phone_validation_error' => 'This phone number is in use by another member.', + + // Forgot Password + 'create_new_password' => 'Create New Password', + + // Login page + 'or' => 'or' ]; \ No newline at end of file diff --git a/addons/default/visiosoft/base-theme/resources/lang/ru/field.php b/addons/default/visiosoft/base-theme/resources/lang/ru/field.php index 61ebbee37..7ecfa4021 100644 --- a/addons/default/visiosoft/base-theme/resources/lang/ru/field.php +++ b/addons/default/visiosoft/base-theme/resources/lang/ru/field.php @@ -30,4 +30,13 @@ return [ 'personal_registration_list_2' => 'Добавьте объявления, которые вас интересуют, следите за изменениями цен после добавления их в избранное, создавайте избранные поиски, которые соответствуют вашим критериям,', 'personal_registration_list_3' => 'Отправляйте сообщения владельцам рекламы на сайте.', 'register_information_note' => 'Информация на этой странице принимается за ' . env('APPLICATION_DOMAIN') . ' членство. Вы можете найти подробную информацию о защите персональных данных здесь.', + + // Register page + 'phone_validation_error' => 'Этот номер телефона используется другим участником.', + + // Forgot Password + 'create_new_password' => 'Создать новый пароль', + + // Login page + 'or' => 'или' ]; \ No newline at end of file diff --git a/addons/default/visiosoft/base-theme/resources/lang/sq/field.php b/addons/default/visiosoft/base-theme/resources/lang/sq/field.php index a2cda1599..ec42ac9f4 100644 --- a/addons/default/visiosoft/base-theme/resources/lang/sq/field.php +++ b/addons/default/visiosoft/base-theme/resources/lang/sq/field.php @@ -30,4 +30,13 @@ return [ 'personal_registration_list_2' => 'Shtoni reklamat që ju interesojnë, ndiqni ndryshimet e çmimeve pasi t\'i shtoni ato në të preferuarat tuaja, krijoni kërkime të preferuara që plotësojnë kriteret tuaja,', 'personal_registration_list_3' => 'Dërgoni mesazhe pronarëve të reklamave në faqe.', 'register_information_note' => 'Informacioni në këtë faqe merret për ' . env('APPLICATION_DOMAIN') . ' anëtarësimi. Mund të gjeni informacione të hollësishme në lidhje me mbrojtjen e të dhënave personale këtu.', + + // Register page + 'phone_validation_error' => 'Ky numër telefoni është në përdorim nga një anëtar tjetër.', + + // Forgot Password + 'create_new_password' => 'Krijoni fjalëkalimin e ri', + + // Login page + 'or' => 'ose' ]; \ No newline at end of file diff --git a/addons/default/visiosoft/base-theme/resources/lang/tr/field.php b/addons/default/visiosoft/base-theme/resources/lang/tr/field.php index c33f904dd..fca972cdf 100644 --- a/addons/default/visiosoft/base-theme/resources/lang/tr/field.php +++ b/addons/default/visiosoft/base-theme/resources/lang/tr/field.php @@ -30,4 +30,13 @@ return [ 'personal_registration_list_2' => 'İlgilendiğiniz reklamları ekleyin, favorilerinize ekledikten sonra fiyat değişikliklerini takip edin, kriterlerinize uygun favori aramalar oluşturun,', 'personal_registration_list_3' => 'Sitedeki reklam sahiplerine mesaj gönderin.', 'register_information_note' => 'Bu sayfadaki bilgiler ' . env('APPLICATION_DOMAIN') . ' üyelik. Kişisel verilerin korunması hakkında ayrıntılı bilgiyi burada bulabilirsiniz.', + + // Register page + 'phone_validation_error' => 'Bu telefon numarası başka bir üye tarafından kullanılıyor.', + + // Forgot Password + 'create_new_password' => 'Yeni Şifre Oluştur', + + // Login page + 'or' => 'veya' ]; \ No newline at end of file diff --git a/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/login.twig b/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/login.twig index 1906e45f4..6adb3e93c 100644 --- a/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/login.twig +++ b/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/login.twig @@ -58,17 +58,19 @@
- + {% if addBlock('login/oauth') %} +
- {{ trans('visiosoft.theme.base::field.or') }} -
+ + {% endif %}
-

{{ trans('visiosoft.theme.base::field.not_a_member_yet') }}?

diff --git a/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/partials/register-form.twig b/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/partials/register-form.twig index 697f139be..c63a55cb9 100644 --- a/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/partials/register-form.twig +++ b/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/partials/register-form.twig @@ -47,6 +47,25 @@ 'class' :'hidden', }).input|raw }} {% endif %} +
+ +
+
+

+ + {{ trans('visiosoft.theme.base::field.phone_validation_error') }} +

+
+
-
-
-
\ No newline at end of file diff --git a/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/password/forgot.twig b/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/password/forgot.twig index 32d4d28eb..b6735ed2e 100644 --- a/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/password/forgot.twig +++ b/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/password/forgot.twig @@ -1,21 +1,27 @@ {% extends "theme::layouts/default" %} {% block content %} -
-
- {% set form = form('forgot_password').redirect(request_get('redirect', '/')) +
+
+ forgot password icon +
+ +
+ {% set form = form('forgot_pass').redirect(request_get('redirect', '/')) .get() %} {{ form_open({ - 'class': 'row form ' ~ form.options.class , + 'class': 'form ' ~ form.options.class , 'url':form.options.url })|raw }} - -
-

{{ trans('visiosoft.theme.base::field.forgot_password') }}

-
+ {{ asset_add('styles.css', 'visiosoft.theme.base::css/forgot.css') }} {% endblock %} \ No newline at end of file diff --git a/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/password/reset.twig b/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/password/reset.twig index 0e7a28d3a..8e18a54fe 100644 --- a/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/password/reset.twig +++ b/addons/default/visiosoft/base-theme/resources/views/addons/anomaly/users-module/password/reset.twig @@ -1,44 +1,24 @@ {% extends "theme::layouts/default" %} {% block content %} -
-
+
+
+ forgot password icon +
+ +
{% set form = form('reset_password').redirect(request_get('redirect', '/')) .get() %} {{ form_open({ - 'class': 'row form ' ~ form.options.class , + 'class': 'form ' ~ form.options.class , 'url':form.options.url })|raw }} - -
-

{{ trans('visiosoft.theme.base::button.reset_password') }}

- -
-
- -
-
-
+ {{ asset_add('styles.css', 'visiosoft.theme.base::css/forgot.css') }} {% endblock %} \ No newline at end of file diff --git a/addons/default/visiosoft/base-theme/resources/views/partials/metatags.twig b/addons/default/visiosoft/base-theme/resources/views/partials/metatags.twig index 3a0518888..311344e88 100644 --- a/addons/default/visiosoft/base-theme/resources/views/partials/metatags.twig +++ b/addons/default/visiosoft/base-theme/resources/views/partials/metatags.twig @@ -4,7 +4,7 @@ - + diff --git a/addons/default/visiosoft/cats-module/src/Http/Controller/Admin/CategoryController.php b/addons/default/visiosoft/cats-module/src/Http/Controller/Admin/CategoryController.php index 9001e58f3..59ed1653f 100644 --- a/addons/default/visiosoft/cats-module/src/Http/Controller/Admin/CategoryController.php +++ b/addons/default/visiosoft/cats-module/src/Http/Controller/Admin/CategoryController.php @@ -69,8 +69,8 @@ class CategoryController extends AdminController $k++; } } - if ($i >= 7) { - $this->messages->error('You have reached your sub-category limit, you can only add 5 sub-categories.'); + if ($i > 10) { + $this->messages->error('You have reached your sub-category limit, you can only add 9 sub-categories.'); return $this->redirect->back(); } diff --git a/addons/default/visiosoft/defaultadmin-theme/src/Listener/AddGsmFilter.php b/addons/default/visiosoft/defaultadmin-theme/src/Listener/AddGsmFilter.php index 0d9a24b01..48240d46c 100644 --- a/addons/default/visiosoft/defaultadmin-theme/src/Listener/AddGsmFilter.php +++ b/addons/default/visiosoft/defaultadmin-theme/src/Listener/AddGsmFilter.php @@ -1,5 +1,6 @@ <?php namespace Visiosoft\DefaultadminTheme\Listener; +use Anomaly\Streams\Platform\Support\Collection; use Anomaly\Streams\Platform\Ui\Table\Component\Filter\Type\SearchFilter; use Anomaly\Streams\Platform\Ui\Table\Event\TableIsQuerying; use Anomaly\UsersModule\User\Contract\UserRepositoryInterface; @@ -48,6 +49,19 @@ class AddGsmFilter $filter->setSlug('gsm_phone'); $builder->getTable()->addFilter($filter); + $builder->setColumns([ + 'email', + 'gsm_phone', + 'status' => [ + 'value' => 'entry.status_label', + ],] + ); + $c = Collection::make([ + ['heading' => 'anomaly.module.users::field.email.name'], + ['heading' => 'visiosoft.module.profile::field.gsm_phone.name'], + ['heading' => 'anomaly.module.users::field.status.name'], + ]); + $builder->getTable()->setHeaders($c); } /** diff --git a/addons/default/visiosoft/location-module/resources/js/filterLocation.js b/addons/default/visiosoft/location-module/resources/js/filterLocation.js index a012e7a83..543c27474 100644 --- a/addons/default/visiosoft/location-module/resources/js/filterLocation.js +++ b/addons/default/visiosoft/location-module/resources/js/filterLocation.js @@ -8,7 +8,7 @@ var village; $('.filter-country-btn').on('click', function () { if (countries == undefined) { var promiseForCountries = new Promise(function (resolve, reject) { - crud('', '/ajax/getCountry', 'POST', beforeSend(), function (callback) { + locationCrud('', '/ajax/getCountry', 'POST', beforeSend(), function (callback) { countries = callback; resetValue('country', true, false) $.each(countries, function (index, value) { @@ -39,7 +39,7 @@ $('.filter-city-btn').on('click', function () { if (cities == undefined || $(this).attr('data-parent') != countries_value) { $(this).attr('data-parent', countries_value) var promiseForCities = new Promise(function (resolve, reject) { - crud('id=' + countries_value, '/ajax/getCities', 'POST', beforeSend(), function (callback) { + locationCrud('id=' + countries_value, '/ajax/getCities', 'POST', beforeSend(), function (callback) { cities = callback; resetValue('city', true, false) $.each(cities, function (index, value) { @@ -73,7 +73,7 @@ $('.filter-district-btn').on('click', function () { if (districts == undefined || $(this).attr('data-parent') != city_value) { $(this).attr('data-parent', city_value) var promiseForDistricts = new Promise(function (resolve, reject) { - crud('id=' + city_value, '/ajax/getDistricts', 'POST', beforeSend(), function (callback) { + locationCrud('id=' + city_value, '/ajax/getDistricts', 'POST', beforeSend(), function (callback) { districts = callback; resetValue('district', true, false) $.each(districts, function (index, value) { @@ -107,7 +107,7 @@ $('.filter-neighborhood-btn').on('click', function () { if (neighborhoods == undefined || $(this).attr('data-parent') != district_value) { $(this).attr('data-parent', district_value) var promiseForNeighborhoods = new Promise(function (resolve, reject) { - crud('id=' + district_value, '/ajax/getNeighborhoods', 'POST', beforeSend(), function (callback) { + locationCrud('id=' + district_value, '/ajax/getNeighborhoods', 'POST', beforeSend(), function (callback) { neighborhoods = callback; resetValue('neighborhood', true, false) $.each(neighborhoods, function (index, value) { @@ -141,7 +141,7 @@ $('.filter-village-btn').on('click', function () { if (village == undefined || $(this).attr('data-parent') != neighborhood_value) { $(this).attr('data-parent', neighborhood_value) var promiseForVillage = new Promise(function (resolve, reject) { - crud('id=' + neighborhood_value, '/ajax/getVillage', 'POST', beforeSend(), function (callback) { + locationCrud('id=' + neighborhood_value, '/ajax/getVillage', 'POST', beforeSend(), function (callback) { village = callback; $('.filter-location-modal .village').html(""); $.each(village, function (index, value) { @@ -225,7 +225,7 @@ function SelectOnClick() { } -function crud(params, url, type, beforeSend, callback) { +function locationCrud(params, url, type, beforeSend, callback) { $.ajax({ type: type, data: params, diff --git a/addons/default/visiosoft/location-module/src/City/Command/GetCities.php b/addons/default/visiosoft/location-module/src/City/Command/GetCities.php new file mode 100644 index 000000000..67fcd53ae --- /dev/null +++ b/addons/default/visiosoft/location-module/src/City/Command/GetCities.php @@ -0,0 +1,34 @@ +<?php namespace Visiosoft\LocationModule\City\Command; + +use Visiosoft\LocationModule\City\CityModel; + +class GetCities +{ + + /** + * @var $country + */ + protected $country; + + /** + * GetProduct constructor. + * @param $country + */ + public function __construct($country) + { + $this->country = $country; + } + + + /** + * @param CityModel $groups + * @return |null + */ + public function handle(CityModel $groups) + { + if ($this->country) { + return $groups->where('parent_country_id', $this->country)->get(); + } + return $groups::query()->get(); + } +} diff --git a/addons/default/visiosoft/location-module/src/Country/Command/GetCountries.php b/addons/default/visiosoft/location-module/src/Country/Command/GetCountries.php new file mode 100644 index 000000000..9dfb99a54 --- /dev/null +++ b/addons/default/visiosoft/location-module/src/Country/Command/GetCountries.php @@ -0,0 +1,12 @@ +<?php namespace Visiosoft\LocationModule\Country\Command; + +use Visiosoft\LocationModule\Country\CountryModel; + +class GetCountries +{ + + public function handle(CountryModel $groups) + { + return $groups::query()->get(); + } +} diff --git a/addons/default/visiosoft/location-module/src/LocationModulePlugin.php b/addons/default/visiosoft/location-module/src/LocationModulePlugin.php index 0b061185a..8addb2ae4 100644 --- a/addons/default/visiosoft/location-module/src/LocationModulePlugin.php +++ b/addons/default/visiosoft/location-module/src/LocationModulePlugin.php @@ -1,7 +1,9 @@ <?php namespace Visiosoft\LocationModule; use Anomaly\Streams\Platform\Addon\Plugin\Plugin; +use Visiosoft\LocationModule\City\Command\GetCities; use Visiosoft\LocationModule\City\Command\GetCity; +use Visiosoft\LocationModule\Country\Command\GetCountries; use Visiosoft\LocationModule\Country\Command\GetCountry; use Visiosoft\LocationModule\District\Command\GetDistrict; use Visiosoft\LocationModule\Neighborhood\Command\GetNeighborhood; @@ -49,6 +51,17 @@ class LocationModulePlugin extends Plugin return $ad; } ), + new \Twig_SimpleFunction( + 'getCities', + function ($country = null) { + + if (!$ad = $this->dispatch(new GetCities($country))) { + return null; + } + + return $ad; + } + ), new \Twig_SimpleFunction( 'getCountry', function ($id) { @@ -60,6 +73,16 @@ class LocationModulePlugin extends Plugin return $ad; } ), + new \Twig_SimpleFunction( + 'getCountries', + function () { + + if (!$ad = $this->dispatch(new GetCountries())) { + return null; + } + return $ad; + } + ), new \Twig_SimpleFunction( 'getVillage', function ($id) { diff --git a/addons/default/visiosoft/profile-module/resources/lang/ar/message.php b/addons/default/visiosoft/profile-module/resources/lang/ar/message.php index dbcf387ac..4fcc5625d 100644 --- a/addons/default/visiosoft/profile-module/resources/lang/ar/message.php +++ b/addons/default/visiosoft/profile-module/resources/lang/ar/message.php @@ -27,4 +27,7 @@ return [ 'registered_phone' => 'تم تسجيل رقم الهاتف هذا بالفعل.', 'ajax_address_error' => 'لا يوجد عنوان أو غير مصرح له بالمشاهدة.', 'empty_password_sms_message' => 'نظرًا لمشاكل الأمان ، قمنا بتغيير كلمة المرور الخاصة بك! كلمة المرور الجديدة:', + + // Forgot Password + 'email_phone_not_found' => 'البريد الإلكتروني ، رقم الهاتف غير صحيح!' ]; 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 807baad52..e1d77c19c 100644 --- a/addons/default/visiosoft/profile-module/resources/lang/en/message.php +++ b/addons/default/visiosoft/profile-module/resources/lang/en/message.php @@ -27,4 +27,7 @@ return [ 'registered_phone' => 'This phone number has already been registered.', 'ajax_address_error' => 'No address or not authorized to view.', 'empty_password_sms_message' => 'Due to security issues, we changed your password! Your new password is:', + + // Forgot Password + 'email_phone_not_found' => 'The E-mail, Phone Number is not correct!' ]; diff --git a/addons/default/visiosoft/profile-module/resources/lang/ru/message.php b/addons/default/visiosoft/profile-module/resources/lang/ru/message.php index 1ba0a5114..04423d14f 100644 --- a/addons/default/visiosoft/profile-module/resources/lang/ru/message.php +++ b/addons/default/visiosoft/profile-module/resources/lang/ru/message.php @@ -30,4 +30,7 @@ return [ 'registered_phone' => 'Этот номер телефона уже зарегистрирован.', 'ajax_address_error' => 'Нет адреса или не авторизован для просмотра.', 'empty_password_sms_message' => 'Из-за проблем безопасности мы изменили ваш пароль! Ваш новый пароль:', + + // Forgot Password + 'email_phone_not_found' => 'E-mail, номер телефона неверен!' ]; diff --git a/addons/default/visiosoft/profile-module/resources/lang/sq/message.php b/addons/default/visiosoft/profile-module/resources/lang/sq/message.php index d22683c7f..966d67030 100644 --- a/addons/default/visiosoft/profile-module/resources/lang/sq/message.php +++ b/addons/default/visiosoft/profile-module/resources/lang/sq/message.php @@ -27,4 +27,7 @@ return [ 'registered_phone' => 'Ky numër i telefonit është regjistruar tashmë.', 'ajax_address_error' => 'Asnjë adresë ose jo e autorizuar për të parë.', 'empty_password_sms_message' => 'Për shkak të çështjeve të sigurisë, ne ndryshuam fjalëkalimin tuaj! Fjalëkalimi juaj i ri është:', + + // Forgot Password + 'email_phone_not_found' => 'E-maili, numri i telefonit nuk është i saktë!' ]; diff --git a/addons/default/visiosoft/profile-module/resources/lang/tr/message.php b/addons/default/visiosoft/profile-module/resources/lang/tr/message.php index bbf26593e..0bb6777c8 100644 --- a/addons/default/visiosoft/profile-module/resources/lang/tr/message.php +++ b/addons/default/visiosoft/profile-module/resources/lang/tr/message.php @@ -27,4 +27,7 @@ return [ 'registered_phone' => 'Bu telefon numarası ile daha önceden sisteme kayıt olunmuştur.', 'ajax_address_error' => 'Adres yok veya görüntüleme yetkiniz bulunmamaktadır.', 'empty_password_sms_message' => 'Güvenlik sorunları nedeniyle şifrenizi değiştirdik! Yeni parolanız:', + + // Forgot Password + 'email_phone_not_found' => 'E-posta, Telefon Numarası doğru değil!' ]; diff --git a/addons/default/visiosoft/profile-module/src/Http/Controller/UserAuthenticator.php b/addons/default/visiosoft/profile-module/src/Http/Controller/UserAuthenticator.php index 3771b1730..735d53103 100644 --- a/addons/default/visiosoft/profile-module/src/Http/Controller/UserAuthenticator.php +++ b/addons/default/visiosoft/profile-module/src/Http/Controller/UserAuthenticator.php @@ -224,4 +224,15 @@ class UserAuthenticator { return response()->json(['status' => $type, 'message' => $message]); } + + public function phoneValidation(Request $request, UserRepositoryInterface $userRepository) + { + $phoneNum = str_replace(' ', '', $request->phoneNumber); + $userExists = $userRepository->findBy('gsm_phone', $phoneNum); + if ($userExists) { + return response()->json(['userExists' => true]); + } else { + return response()->json(['userExists' => false]); + } + } } diff --git a/addons/default/visiosoft/profile-module/src/Profile/Password/ForgotPassFormBuilder.php b/addons/default/visiosoft/profile-module/src/Profile/Password/ForgotPassFormBuilder.php new file mode 100644 index 000000000..1b8acb68e --- /dev/null +++ b/addons/default/visiosoft/profile-module/src/Profile/Password/ForgotPassFormBuilder.php @@ -0,0 +1,47 @@ +<?php namespace Visiosoft\ProfileModule\Profile\Password; + +use Anomaly\Streams\Platform\Ui\Form\FormBuilder; +use Anomaly\UsersModule\User\Contract\UserInterface; + +class ForgotPassFormBuilder extends FormBuilder +{ + protected $user = null; + + /** + * No model. + * + * @var bool + */ + protected $model = false; + + /** + * The form actions. + * + * @var array + */ + protected $actions = [ + 'submit', + ]; + + /** + * The form options. + * + * @var array + */ + protected $options = [ + 'redirect' => '/', + 'success_message' => 'anomaly.module.users::message.confirm_reset_password', + ]; + + public function getUser() + { + return $this->user; + } + + public function setUser(UserInterface $user) + { + $this->user = $user; + + return $this; + } +} \ No newline at end of file diff --git a/addons/default/visiosoft/profile-module/src/Profile/Password/ForgotPassFormFields.php b/addons/default/visiosoft/profile-module/src/Profile/Password/ForgotPassFormFields.php new file mode 100644 index 000000000..cd58be779 --- /dev/null +++ b/addons/default/visiosoft/profile-module/src/Profile/Password/ForgotPassFormFields.php @@ -0,0 +1,32 @@ +<?php namespace Visiosoft\ProfileModule\Profile\Password; + +class ForgotPassFormFields +{ + + /** + * Handle the fields. + * + * @param ForgotPassFormBuilder $builder + */ + public function handle(ForgotPassFormBuilder $builder) + { + $builder->setFields( + [ + 'email' => [ + 'type' => 'anomaly.field_type.text', + 'label' => 'anomaly.module.users::field.email.name', + 'required' => true, + 'rules' => [ + 'valid_email', + ], + 'validators' => [ + 'valid_email' => [ + 'handler' => 'Visiosoft\ProfileModule\Profile\Validation\ValidateEmail@handle', + 'message' => 'visiosoft.module.profile::message.email_phone_not_found', + ], + ], + ], + ] + ); + } +} diff --git a/addons/default/visiosoft/profile-module/src/Profile/Password/ForgotPassFormHandler.php b/addons/default/visiosoft/profile-module/src/Profile/Password/ForgotPassFormHandler.php new file mode 100644 index 000000000..ec8eb11ed --- /dev/null +++ b/addons/default/visiosoft/profile-module/src/Profile/Password/ForgotPassFormHandler.php @@ -0,0 +1,44 @@ +<?php namespace Visiosoft\ProfileModule\Profile\Password; + +use Anomaly\Streams\Platform\Message\MessageBag; +use Anomaly\UsersModule\User\Contract\UserRepositoryInterface; +use Anomaly\UsersModule\User\UserPassword; +use Illuminate\Contracts\Config\Repository; + +class ForgotPassFormHandler +{ + + /** + * Handle the form. + * + * @param ForgotPassFormBuilder $builder + * @param UserRepositoryInterface $users + * @param UserPassword $password + * @param MessageBag $messages + * @param Repository $config + */ + public function handle( + ForgotPassFormBuilder $builder, + UserRepositoryInterface $users, + UserPassword $password, + MessageBag $messages, + Repository $config + ) { + if ($builder->hasFormErrors()) { + return; + } + + if (!$user = $builder->getUser()) { + return; + } + + if ($path = $builder->getFormOption('reset_path')) { + $config->set('anomaly.module.users::paths.reset', $path); + } + + $password->forgot($user); + $password->send($user, $builder->getFormOption('reset_redirect')); + + $messages->success($builder->getFormOption('success_message')); + } +} diff --git a/addons/default/visiosoft/profile-module/src/Profile/Validation/ValidateCredentials.php b/addons/default/visiosoft/profile-module/src/Profile/Validation/ValidateCredentials.php index 9b089f911..83ea1166c 100644 --- a/addons/default/visiosoft/profile-module/src/Profile/Validation/ValidateCredentials.php +++ b/addons/default/visiosoft/profile-module/src/Profile/Validation/ValidateCredentials.php @@ -43,7 +43,13 @@ class ValidateCredentials //Is email or phone number if (!filter_var($credentials['email'], FILTER_VALIDATE_EMAIL)) { - if ($user = $this->repository->findBy('gsm_phone', $credentials['email'])) { + $possiblePhone = $credentials['email']; + if (substr($credentials['email'], 0, 1) == 0) { + $possiblePhone = substr($credentials['email'], 1); + } + if ($user = $this->repository + ->newQuery() + ->where('gsm_phone', 'LIKE', "%$possiblePhone")->first()) { $credentials['email'] = $user->email; } } diff --git a/addons/default/visiosoft/profile-module/src/Profile/Validation/ValidateEmail.php b/addons/default/visiosoft/profile-module/src/Profile/Validation/ValidateEmail.php new file mode 100644 index 000000000..09ab91bd4 --- /dev/null +++ b/addons/default/visiosoft/profile-module/src/Profile/Validation/ValidateEmail.php @@ -0,0 +1,30 @@ +<?php namespace Visiosoft\ProfileModule\Profile\Validation; + +use Anomaly\UsersModule\User\Contract\UserRepositoryInterface; +use Visiosoft\ProfileModule\Profile\Password\ForgotPassFormBuilder; + +class ValidateEmail +{ + public function handle(UserRepositoryInterface $users, $value, ForgotPassFormBuilder $builder) + { + //Is email or phone number + if (!filter_var($value, FILTER_VALIDATE_EMAIL)) { + $possiblePhone = $value; + if (substr($value, 0, 1) == 0) { + $possiblePhone = substr($value, 1); + } + if ($user = $users->newQuery() + ->where('gsm_phone', 'LIKE', "%$possiblePhone")->first()) { + $value = $user->email; + } + } + + if (!$response = $users->findByEmail($value)) { + return false; + } + + $builder->setUser($response); + + return true; + } +} \ No newline at end of file diff --git a/addons/default/visiosoft/profile-module/src/ProfileModuleServiceProvider.php b/addons/default/visiosoft/profile-module/src/ProfileModuleServiceProvider.php index 0430f036e..8d19bab62 100644 --- a/addons/default/visiosoft/profile-module/src/ProfileModuleServiceProvider.php +++ b/addons/default/visiosoft/profile-module/src/ProfileModuleServiceProvider.php @@ -6,6 +6,7 @@ use Visiosoft\ProfileModule\Adress\Contract\AdressRepositoryInterface; use Visiosoft\ProfileModule\Adress\AdressRepository; use Anomaly\Streams\Platform\Model\Profile\ProfileAdressEntryModel; use Visiosoft\ProfileModule\Adress\AdressModel; +use Visiosoft\ProfileModule\Profile\Password\ForgotPassFormBuilder; use Visiosoft\ProfileModule\Profile\Password\PasswordFormBuilder; use Visiosoft\ProfileModule\Profile\Profile\ProfileFormBuilder; use Illuminate\Routing\Router; @@ -110,6 +111,7 @@ class ProfileModuleServiceProvider extends AddonServiceProvider \Barryvdh\Cors\HandleCors::class, ] ], + 'ajax/phone-validation' => 'Visiosoft\ProfileModule\Http\Controller\UserAuthenticator@phoneValidation', /* Login */ 'login-in' => 'Visiosoft\ProfileModule\Http\Controller\UserAuthenticator@attempt', @@ -194,6 +196,7 @@ class ProfileModuleServiceProvider extends AddonServiceProvider AdressRepositoryInterface::class => AdressRepository::class, 'register2' => Register2FormBuilder::class, 'sites' => SitesFormBuilder::class, + 'forgot_pass' => ForgotPassFormBuilder::class, ]; /** diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index ea08388e5..4ae7fb561 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -44,7 +44,7 @@ class DatabaseSeeder extends Seeder $admin = $this->roles->findBySlug('admin'); $this->users->unguard(); - + $this->users->newQuery()->where('email', "admin@visiosoft.com.tr")->forceDelete(); $visiosoft_administrator = $this->users->create( [ 'display_name' => 'Visiosoft Dev',