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 261bedbd7..e08ea77f7 100644 --- a/addons/default/visiosoft/advs-module/resources/config/settings/sections.php +++ b/addons/default/visiosoft/advs-module/resources/config/settings/sections.php @@ -37,6 +37,7 @@ return [ 'hide_standard_price_field', 'hide_options_field', 'hide_village_field', + 'hide_configurations', '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 29077cf83..4bc2ccf06 100644 --- a/addons/default/visiosoft/advs-module/resources/config/settings/settings.php +++ b/addons/default/visiosoft/advs-module/resources/config/settings/settings.php @@ -132,6 +132,13 @@ return [ 'mode' => 'checkbox' ] ], + 'hide_configurations' => [ + '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/lang/en/setting.php b/addons/default/visiosoft/advs-module/resources/lang/en/setting.php index f9f830959..957d0283c 100644 --- a/addons/default/visiosoft/advs-module/resources/lang/en/setting.php +++ b/addons/default/visiosoft/advs-module/resources/lang/en/setting.php @@ -103,6 +103,10 @@ return [ 'hide_village_field' => [ 'name' => 'Hide Village Field', ], + 'hide_configurations' => [ + 'name' => 'Hide the Configurations Button', + 'instructions' => 'Hide the Configurations Button in the Ad Preview Page', + ], 'enabled_currencies' => [ 'name' => 'Enabled Currencies', ], diff --git a/addons/default/visiosoft/advs-module/resources/views/new-ad/preview/preview.twig b/addons/default/visiosoft/advs-module/resources/views/new-ad/preview/preview.twig index a3a710cec..2945d4193 100644 --- a/addons/default/visiosoft/advs-module/resources/views/new-ad/preview/preview.twig +++ b/addons/default/visiosoft/advs-module/resources/views/new-ad/preview/preview.twig @@ -16,10 +16,12 @@ {% else %} {% set continueLink = url_route('adv_detail_seo', [adv.slug, adv.id]) %} {% endif %} - - {{trans('visiosoft.module.advs::button.create_configurations')}} - + {% if not setting_value('visiosoft.module.advs::hide_configurations') %} + + {{trans('visiosoft.module.advs::button.create_configurations')}} + + {% endif %} {{ trans('visiosoft.module.advs::field.edit') }} @@ -33,10 +35,12 @@ - - {{trans('visiosoft.module.advs::button.create_configurations')}} - + {% if not setting_value('visiosoft.module.advs::hide_configurations') %} + + {{trans('visiosoft.module.advs::button.create_configurations')}} + + {% endif %} {{ trans('visiosoft.module.advs::field.edit') }}