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/css/step.scss b/addons/default/visiosoft/advs-module/resources/css/step.scss new file mode 100644 index 000000000..b898317a4 --- /dev/null +++ b/addons/default/visiosoft/advs-module/resources/css/step.scss @@ -0,0 +1,86 @@ +#stepProgressBar { + counter-reset: step; + + .step { + text-align: center; + min-width: 0; + + &.current { + &::after { + background: linear-gradient(to right, #209579 50%, #dfdfdf 50%); + } + + .bullet { + color: #209579; + background-color: #fff; + border: .2rem solid #209579; + @media only screen and (min-width: 768px) { + border: .3rem solid #209579; + } + } + + .step-text { + font-weight: 500; + } + + & ~ * { + &::after { + background-color: #dfdfdf; + } + + .bullet { + color: #999; + background-color: #DFDFDF; + } + } + } + + &::after { + content: ''; + position: absolute; + height: .16rem; + top: 0.96rem; + left: 0; + z-index: -1; + width: 100%; + background-color: #209579; + @media only screen and (min-width: 768px) { + height: .3rem; + top: 1.4rem; + } + } + + .bullet { + height: 2rem; + width: 2rem; + border-radius: 100%; + color: #fff; + display: inline-block; + position: relative; + line-height: 20px; + background-color: #209579; + @media only screen and (min-width: 768px) { + height: 3rem; + width: 3rem; + } + + &::before { + content: counter(step); + counter-increment: step; + font-size: 14px; + font-weight: 600; + @media only screen and (min-width: 768px) { + font-size: 20px; + } + } + } + + .step-text { + color: #999; + font-size: 12px; + @media only screen and (min-width: 768px) { + font-size: initial; + } + } + } +} 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/field.php b/addons/default/visiosoft/advs-module/resources/lang/en/field.php index 6fd4f4005..c3ec7489f 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/en/field.php +++ b/addons/default/visiosoft/advs-module/resources/lang/en/field.php @@ -301,6 +301,10 @@ return [ // New create page 'options' => 'Options', + 'category_selection' => 'Category Selection', + 'listing_details' => 'Listing Details', + 'preview' => 'Preview', + 'congratulations' => 'Congratulations', 'free' => 'Free', 'ad_date' => 'Ad Date', 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()
+ : '' }}
+