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 8c0a8a34a..75de1d0be 100644 --- a/addons/default/visiosoft/advs-module/resources/config/settings/sections.php +++ b/addons/default/visiosoft/advs-module/resources/config/settings/sections.php @@ -23,14 +23,23 @@ return [ 'latest-limit', 'popular_ads_limit', 'default_view_type', + 'hide_listing_standard_price', 'hide_zero_price', 'auto_approve', 'estimated_pending_time', 'default_published_time', 'default_GET', + 'listing_page_image', + ], + ], + 'create_ad' => [ + 'title' => 'visiosoft.module.advs::section.create_ad', + 'fields' => [ 'hide_standard_price_field', 'hide_options_field', - 'listing_page_image', + 'hide_village_field', + 'hide_configurations', + 'make_map_required', 'show_breadcrumb_when_creating_ad', ], ], 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 b7a24c416..7ef868ffe 100644 --- a/addons/default/visiosoft/advs-module/resources/config/settings/settings.php +++ b/addons/default/visiosoft/advs-module/resources/config/settings/settings.php @@ -125,6 +125,34 @@ return [ 'mode' => 'checkbox' ] ], + 'hide_village_field' => [ + 'type' => 'anomaly.field_type.boolean', + 'config' => [ + 'default_value' => false, + 'mode' => 'checkbox' + ] + ], + 'hide_configurations' => [ + 'type' => 'anomaly.field_type.boolean', + 'config' => [ + 'default_value' => false, + 'mode' => 'checkbox' + ] + ], + 'make_map_required' => [ + 'type' => 'anomaly.field_type.boolean', + 'config' => [ + 'default_value' => false, + 'mode' => 'checkbox' + ] + ], + 'hide_listing_standard_price' => [ + 'type' => 'anomaly.field_type.boolean', + 'config' => [ + 'default_value' => false, + 'mode' => 'checkbox' + ] + ], 'enabled_currencies' => [ 'bind' => 'streams::currencies.enabled', 'env' => 'ADV_ENABLED_CURRENCIES', diff --git a/addons/default/visiosoft/advs-module/resources/js/required-map.js b/addons/default/visiosoft/advs-module/resources/js/required-map.js new file mode 100644 index 000000000..d3c296193 --- /dev/null +++ b/addons/default/visiosoft/advs-module/resources/js/required-map.js @@ -0,0 +1,7 @@ +$('#createEditAdvForm').submit(function () { + if ($('input[name=map_Val]').val().length === 0) { + alert(selectLocationAlert) + return false + } + return true +}) \ No newline at end of file diff --git a/addons/default/visiosoft/advs-module/resources/lang/en/message.php b/addons/default/visiosoft/advs-module/resources/lang/en/message.php index 04526f1d0..8fb05b55f 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/en/message.php +++ b/addons/default/visiosoft/advs-module/resources/lang/en/message.php @@ -25,4 +25,5 @@ return [ 'no_add_found' => 'No Ad Found!', 'replicated_success' => 'The ad has been replicated successfully!', 'ad_doesnt_exist' => "This ad doesn't exist!", + 'select_location_error' => "Please select a location on the map!", ]; diff --git a/addons/default/visiosoft/advs-module/resources/lang/en/section.php b/addons/default/visiosoft/advs-module/resources/lang/en/section.php index cdd4948d1..1992005b1 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/en/section.php +++ b/addons/default/visiosoft/advs-module/resources/lang/en/section.php @@ -41,6 +41,7 @@ return [ 'ads' => 'Ads', 'user' => 'User', 'filter' => 'Filter', + 'create_ad' => 'Create Ad', 'options' => [ 'title' => 'Options', ], 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 d4db6a482..56e9cf779 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/en/setting.php +++ b/addons/default/visiosoft/advs-module/resources/lang/en/setting.php @@ -100,6 +100,20 @@ return [ 'hide_options_field' => [ 'name' => 'Hide Options Field', ], + 'hide_village_field' => [ + 'name' => 'Hide Village Field', + ], + 'hide_configurations' => [ + 'name' => 'Hide the Configurations Button', + 'instructions' => 'Hide the Configurations Button in the Ad Preview Page', + ], + 'make_map_required' => [ + 'name' => 'Make Map Required', + 'instructions' => 'Require the user to place a pin on the map when creating an ad', + ], + 'hide_listing_standard_price' => [ + 'name' => 'Hide Listing Standard Price', + ], 'enabled_currencies' => [ 'name' => 'Enabled Currencies', ], diff --git a/addons/default/visiosoft/advs-module/resources/views/list/partials/ads.twig b/addons/default/visiosoft/advs-module/resources/views/list/partials/ads.twig index 0025fb8f8..4c2b43593 100644 --- a/addons/default/visiosoft/advs-module/resources/views/list/partials/ads.twig +++ b/addons/default/visiosoft/advs-module/resources/views/list/partials/ads.twig @@ -21,11 +21,13 @@
- {{ adv.standard_price != adv.price and adv.standard_price != '0'
- ? adv.standard_price.currency()
- : '' }}
-
+ {{ adv.standard_price != adv.price and adv.standard_price != '0'
+ ? adv.standard_price.currency()
+ : '' }}
+