mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-24 22:11:01 -06:00
removed required location fields
This commit is contained in:
parent
2998fd4ca6
commit
fc8d7d1e24
@ -12,11 +12,11 @@ class VisiosoftModuleAdvsCreateAdvsStream extends Migration
|
|||||||
*/
|
*/
|
||||||
protected $stream = [
|
protected $stream = [
|
||||||
'slug' => 'advs',
|
'slug' => 'advs',
|
||||||
'title_column' => 'name',
|
'title_column' => 'name',
|
||||||
'translatable' => true,
|
'translatable' => true,
|
||||||
'trashable' => true,
|
'trashable' => true,
|
||||||
'searchable' => false,
|
'searchable' => false,
|
||||||
'sortable' => false,
|
'sortable' => false,
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -55,12 +55,8 @@ class VisiosoftModuleAdvsCreateAdvsStream extends Migration
|
|||||||
'online_payment',
|
'online_payment',
|
||||||
'is_get_adv',
|
'is_get_adv',
|
||||||
'stock',
|
'stock',
|
||||||
'country' => [
|
'country',
|
||||||
'required' => true
|
'city',
|
||||||
],
|
|
||||||
'city' => [
|
|
||||||
'required' => true
|
|
||||||
],
|
|
||||||
'district',
|
'district',
|
||||||
'neighborhood',
|
'neighborhood',
|
||||||
'village',
|
'village',
|
||||||
|
|||||||
@ -69,15 +69,11 @@ function Locations(cat, level, name){
|
|||||||
data: "cat=" + cat + "&level=" + level,
|
data: "cat=" + cat + "&level=" + level,
|
||||||
url: "/class/ajax",
|
url: "/class/ajax",
|
||||||
success: function(msg){
|
success: function(msg){
|
||||||
hideLoader()
|
|
||||||
$('select[name="'+name+'"]').find('option').remove();
|
$('select[name="'+name+'"]').find('option').remove();
|
||||||
$('select[name="'+name+'"]').append('<option value="">Choose an option...</option>');
|
$('select[name="'+name+'"]').append('<option value="">Choose an option...</option>');
|
||||||
$.each(msg, function(key, value){
|
$.each(msg, function(key, value){
|
||||||
$('select[name="'+name+'"]').append('<option value="'+value.id+'">'+value.name+'</option>');
|
$('select[name="'+name+'"]').append('<option value="'+value.id+'">'+value.name+'</option>');
|
||||||
});
|
});
|
||||||
},
|
|
||||||
beforeSend: function () {
|
|
||||||
showLoader()
|
|
||||||
}
|
}
|
||||||
}).promise().done(function() {
|
}).promise().done(function() {
|
||||||
setLocation(level);
|
setLocation(level);
|
||||||
|
|||||||
@ -73,7 +73,29 @@ $('input[name="price"]').on('click', function () {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).on('ajaxComplete ready shown.bs.tab', function () {
|
$(document).ready(function () {
|
||||||
|
|
||||||
|
$('input[data-provides="anomaly.field_type.slug"]:not([data-initialized])').each(function () {
|
||||||
|
|
||||||
|
$(this).attr('data-initialized', '');
|
||||||
|
|
||||||
|
var config = {
|
||||||
|
slug: this,
|
||||||
|
lowercase: $(this).data('lowercase')
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Only slugify other fields if
|
||||||
|
* value is empty OR configured
|
||||||
|
* to always slugify field values.
|
||||||
|
*/
|
||||||
|
if (!$(this).val() || $(this).data('always_slugify')) {
|
||||||
|
config.slugify = '[data-field="' + $(this).data('slugify') + '"]:visible:first';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Slugify slug inputs.
|
||||||
|
$(this).slugify(config);
|
||||||
|
});
|
||||||
|
|
||||||
// Initialize WYSIWYG editors.
|
// Initialize WYSIWYG editors.
|
||||||
$('textarea[data-field="advs_desc"]:not(.hasEditor)').each(function () {
|
$('textarea[data-field="advs_desc"]:not(.hasEditor)').each(function () {
|
||||||
|
|||||||
@ -107,7 +107,6 @@
|
|||||||
</div>
|
</div>
|
||||||
{{ form.close|raw }}
|
{{ form.close|raw }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
<script>
|
<script>
|
||||||
var default_country = "{{ setting_value('visiosoft.module.advs::default_country') }}";
|
var default_country = "{{ setting_value('visiosoft.module.advs::default_country') }}";
|
||||||
@ -119,10 +118,7 @@
|
|||||||
var adv_id = "{{ id }}";
|
var adv_id = "{{ id }}";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="https://maps.googleapis.com/maps/api/js?key={{ setting_value('visiosoft.module.advs::google_map_key') }}&callback="
|
|
||||||
type="text/javascript"></script>
|
|
||||||
{{ asset_add("scripts.js", "visiosoft.module.advs::js/new-create.js") }}
|
{{ asset_add("scripts.js", "visiosoft.module.advs::js/new-create.js") }}
|
||||||
{{ asset_add("scripts.js", "visiosoft.module.advs::js/location.js") }}
|
|
||||||
{{ asset_add("scripts.js", "streams::js/form/form.js") }}
|
{{ asset_add("scripts.js", "streams::js/form/form.js") }}
|
||||||
{{ asset_add("scripts.js", "streams::js/form/translations.js") }}
|
{{ asset_add("scripts.js", "streams::js/form/translations.js") }}
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,12 @@ return [
|
|||||||
'default_value' => true,
|
'default_value' => true,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'default_country' => [
|
'create_ad_page_location' => [
|
||||||
|
'type' => 'anomaly.field_type.boolean',
|
||||||
|
'config' => [
|
||||||
|
'default_value' => true,
|
||||||
|
],
|
||||||
|
], 'default_country' => [
|
||||||
'type' => 'anomaly.field_type.relationship',
|
'type' => 'anomaly.field_type.relationship',
|
||||||
"config" => [
|
"config" => [
|
||||||
"related" => \Visiosoft\LocationModule\Country\CountryModel::class,
|
"related" => \Visiosoft\LocationModule\Country\CountryModel::class,
|
||||||
|
|||||||
@ -16,4 +16,7 @@ return [
|
|||||||
'default_country' => [
|
'default_country' => [
|
||||||
'name' => 'Default Country',
|
'name' => 'Default Country',
|
||||||
],
|
],
|
||||||
|
'create_ad_page_location' => [
|
||||||
|
'name' => 'Create Ad Page Location',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -1,27 +1,32 @@
|
|||||||
<div class="row form-group location-map">
|
{% if setting_value('visiosoft.module.location::create_ad_page_location') %}
|
||||||
<div class="col-sm-4">
|
<div class="row form-group location-map">
|
||||||
<ul style="padding: 0">
|
<div class="col-sm-4">
|
||||||
<li class="country-data" data-content="{{ adv['country_id'] }}"
|
<ul style="padding: 0">
|
||||||
data-default="{{ setting_value('visiosoft.module.advs::default_country') }}"
|
<li class="country-data" data-content="{{ adv['country_id'] }}"
|
||||||
class="location-field country-data">{{ form.fields.country|raw }}</li>
|
data-default="{{ setting_value('visiosoft.module.advs::default_country') }}"
|
||||||
<li class="city-data" data-content="{{ adv['city'] }}"
|
class="location-field country-data">{{ form.fields.country|raw }}</li>
|
||||||
data-default="{{ setting_value('visiosoft.module.advs::default_city') }}"
|
<li class="city-data" data-content="{{ adv['city'] }}"
|
||||||
class="location-field city-data">{{ form.fields.city|raw }}</li>
|
data-default="{{ setting_value('visiosoft.module.advs::default_city') }}"
|
||||||
<li class="district-data" data-content="{{ adv['district'] }}"
|
class="location-field city-data">{{ form.fields.city|raw }}</li>
|
||||||
class="location-field district-data">{{ form.fields.district|raw }}</li>
|
<li class="district-data" data-content="{{ adv['district'] }}"
|
||||||
<li class="neighborhood-data" data-content="{{ adv['neighborhood'] }}"
|
class="location-field district-data">{{ form.fields.district|raw }}</li>
|
||||||
class="location-field neighborhood-data">{{ form.fields.neighborhood|raw }}</li>
|
<li class="neighborhood-data" data-content="{{ adv['neighborhood'] }}"
|
||||||
<li class="village-data" data-content="{{ adv['village'] }}"
|
class="location-field neighborhood-data">{{ form.fields.neighborhood|raw }}</li>
|
||||||
class="location-field">{{ form.fields.village|raw }}</li>
|
<li class="village-data" data-content="{{ adv['village'] }}"
|
||||||
</ul>
|
class="location-field">{{ form.fields.village|raw }}</li>
|
||||||
</div>
|
</ul>
|
||||||
<div class="col-sm-8">
|
</div>
|
||||||
<div id="map-canvas" style="
|
<div class="col-sm-8">
|
||||||
|
<div id="map-canvas" style="
|
||||||
position: relative; overflow: hidden;
|
position: relative; overflow: hidden;
|
||||||
transform: translateZ(0px) translateZ(0px) translateZ(0px) translateZ(0px) translateZ(0px) translateZ(0px);
|
transform: translateZ(0px) translateZ(0px) translateZ(0px) translateZ(0px) translateZ(0px) translateZ(0px);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height:550px;
|
height:550px;
|
||||||
background-color: rgb(229, 227, 223);
|
background-color: rgb(229, 227, 223);
|
||||||
"></div>
|
"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<script src="https://maps.googleapis.com/maps/api/js?key={{ setting_value('visiosoft.module.advs::google_map_key') }}&callback="
|
||||||
|
type="text/javascript"></script>
|
||||||
|
{{ asset_add("scripts.js", "visiosoft.module.advs::js/location.js") }}
|
||||||
|
{% endif %}
|
||||||
@ -59,7 +59,7 @@ return [
|
|||||||
'name' => 'Kimlik Numarası'
|
'name' => 'Kimlik Numarası'
|
||||||
],
|
],
|
||||||
'adress_name' => [
|
'adress_name' => [
|
||||||
'name' => 'Adres Ado'
|
'name' => 'Adres Adı'
|
||||||
],
|
],
|
||||||
'adress_first_name' => [
|
'adress_first_name' => [
|
||||||
'name' => 'İsim'
|
'name' => 'İsim'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user