#2647 emlak24 yapılacaklar

This commit is contained in:
Diatrex 2020-11-12 16:30:35 +03:00
parent 548736ee5a
commit e360e2f101
6 changed files with 27 additions and 0 deletions

View File

@ -38,6 +38,7 @@ return [
'hide_options_field',
'hide_village_field',
'hide_configurations',
'make_map_required',
'show_breadcrumb_when_creating_ad',
],
],

View File

@ -139,6 +139,13 @@ return [
'mode' => 'checkbox'
]
],
'make_map_required' => [
'type' => 'anomaly.field_type.boolean',
'config' => [
'default_value' => false,
'mode' => 'checkbox'
]
],
'enabled_currencies' => [
'bind' => 'streams::currencies.enabled',
'env' => 'ADV_ENABLED_CURRENCIES',

View File

@ -0,0 +1,7 @@
$('#createEditAdvForm').submit(function () {
if ($('input[name=map_Val]').val().length === 0) {
alert(selectLocationAlert)
return false
}
return true
})

View File

@ -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!",
];

View File

@ -107,6 +107,10 @@ return [
'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',
],
'enabled_currencies' => [
'name' => 'Enabled Currencies',
],

View File

@ -206,6 +206,13 @@
var pick_option = "{{ trans('visiosoft.module.location::field.pick_option.name') }}"
</script>
{% if setting_value('visiosoft.module.advs::make_map_required') %}
<script>
let selectLocationAlert = "{{ trans('visiosoft.module.advs::message.select_location_error') }}"
</script>
{{ asset_add("scripts.js", "visiosoft.module.advs::js/required-map.js") }}
{% endif %}
{{ asset_add("scripts.js", "visiosoft.module.advs::js/new-create.js") }}
{{ asset_add("scripts.js", "streams::js/form/form.js") }}
{{ asset_add("scripts.js", "streams::js/form/translations.js") }}