mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 23:06:08 -06:00
bid developments
This commit is contained in:
parent
e7a6d6ae8f
commit
9290c9951f
@ -455,4 +455,11 @@ return [
|
|||||||
'default_value' => false,
|
'default_value' => false,
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'show_finish_and_publish_date' => [
|
||||||
|
'type' => 'anomaly.field_type.boolean',
|
||||||
|
'config' => [
|
||||||
|
'default_value' => false,
|
||||||
|
],
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -27,7 +27,7 @@ return [
|
|||||||
'favicon' => [
|
'favicon' => [
|
||||||
'name' => 'Favicon',
|
'name' => 'Favicon',
|
||||||
]
|
]
|
||||||
,'map_coordinates_long' => [
|
, 'map_coordinates_long' => [
|
||||||
'name' => 'Map Long Coordinate',
|
'name' => 'Map Long Coordinate',
|
||||||
],
|
],
|
||||||
'map_coordinates_lat' => [
|
'map_coordinates_lat' => [
|
||||||
@ -41,7 +41,7 @@ return [
|
|||||||
],
|
],
|
||||||
'ogImage' => [
|
'ogImage' => [
|
||||||
'name' => 'Social Share Logo',
|
'name' => 'Social Share Logo',
|
||||||
'warning' => 'It should be at a resolution of 1200 x 630. ',
|
'warning' => 'It should be at a resolution of 1200 x 630. ',
|
||||||
|
|
||||||
],
|
],
|
||||||
'currencies' => [
|
'currencies' => [
|
||||||
@ -52,7 +52,7 @@ return [
|
|||||||
],
|
],
|
||||||
'site_address' => [
|
'site_address' => [
|
||||||
'name' => 'Site address',
|
'name' => 'Site address',
|
||||||
'warning' => 'Auto added www. www.<strong>sitename.com</strong> ',
|
'warning' => 'Auto added www. www.<strong>sitename.com</strong> ',
|
||||||
],
|
],
|
||||||
'google_map_key' => [
|
'google_map_key' => [
|
||||||
'name' => 'Google Map Api Key',
|
'name' => 'Google Map Api Key',
|
||||||
@ -134,9 +134,9 @@ return [
|
|||||||
'market_place' => [
|
'market_place' => [
|
||||||
'name' => 'Market Place',
|
'name' => 'Market Place',
|
||||||
],
|
],
|
||||||
'price_area_hidden' => [
|
'price_area_hidden' => [
|
||||||
'name' => 'Price Area Hidden',
|
'name' => 'Price Area Hidden',
|
||||||
],
|
],
|
||||||
'hide_price_filter' => [
|
'hide_price_filter' => [
|
||||||
'name' => 'Hide Price Filter',
|
'name' => 'Hide Price Filter',
|
||||||
],
|
],
|
||||||
@ -215,18 +215,18 @@ return [
|
|||||||
'name' => 'Hide Created Date',
|
'name' => 'Hide Created Date',
|
||||||
'instructions' => 'Hide created date in ads detail page',
|
'instructions' => 'Hide created date in ads detail page',
|
||||||
],
|
],
|
||||||
'hide_listing_header' => [
|
'hide_listing_header' => [
|
||||||
'name' => 'Hide Listing Header',
|
'name' => 'Hide Listing Header',
|
||||||
'instructions' => 'Hiding to ordering and view types',
|
'instructions' => 'Hiding to ordering and view types',
|
||||||
],
|
],
|
||||||
'hide_filter_section' => [
|
'hide_filter_section' => [
|
||||||
'name' => 'Hide Filter Section',
|
'name' => 'Hide Filter Section',
|
||||||
'instructions' => 'Hiding to left filter area in listing page',
|
'instructions' => 'Hiding to left filter area in listing page',
|
||||||
],
|
],
|
||||||
'hide_seller_info' => [
|
'hide_seller_info' => [
|
||||||
'name' => 'Hide Seller Information',
|
'name' => 'Hide Seller Information',
|
||||||
'instructions' => 'Hiding to seller infos in ads detail page',
|
'instructions' => 'Hiding to seller infos in ads detail page',
|
||||||
],
|
],
|
||||||
'show_post_ad_agreement' => [
|
'show_post_ad_agreement' => [
|
||||||
'name' => 'Show Post Ad Agreement',
|
'name' => 'Show Post Ad Agreement',
|
||||||
'instructions' => 'Turn this on if you want to display a privacy policy agreement on the ad creation page',
|
'instructions' => 'Turn this on if you want to display a privacy policy agreement on the ad creation page',
|
||||||
@ -251,9 +251,9 @@ return [
|
|||||||
'name' => 'GET Categories',
|
'name' => 'GET Categories',
|
||||||
'instructions' => 'It represents the categories in which the GET property will be valid.'
|
'instructions' => 'It represents the categories in which the GET property will be valid.'
|
||||||
],
|
],
|
||||||
'disable_sentry' => [
|
'disable_sentry' => [
|
||||||
'name' => 'Disable Sentry'
|
'name' => 'Disable Sentry'
|
||||||
],
|
],
|
||||||
'watermark' => [
|
'watermark' => [
|
||||||
'name' => 'Watermark',
|
'name' => 'Watermark',
|
||||||
'instructions' => 'Is watermark active?'
|
'instructions' => 'Is watermark active?'
|
||||||
@ -265,11 +265,15 @@ return [
|
|||||||
'show_subcats_mobile' => [
|
'show_subcats_mobile' => [
|
||||||
'name' => 'Show subcategories on mobile view',
|
'name' => 'Show subcategories on mobile view',
|
||||||
],
|
],
|
||||||
'show_price_to_members_only' => [
|
'show_price_to_members_only' => [
|
||||||
'name' => 'Show Price To Members Only',
|
'name' => 'Show Price To Members Only',
|
||||||
],
|
],
|
||||||
'hide_ad_cat' => [
|
'hide_ad_cat' => [
|
||||||
'name' => 'Hide Categories',
|
'name' => 'Hide Categories',
|
||||||
'instructions' => 'Hide categories in ads list'
|
'instructions' => 'Hide categories in ads list'
|
||||||
]
|
],
|
||||||
|
'show_finish_and_publish_date' => [
|
||||||
|
'name' => 'Show Finish Date And Publish Date For Create',
|
||||||
|
'instructions' => 'Displays the publish_at and finish_at fields on the ad creation page.'
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -135,6 +135,95 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row mx-0 my-3">
|
||||||
|
<div class="col-6 px-0">
|
||||||
|
<label>
|
||||||
|
{{ form.fields.publish_at.label|raw }}
|
||||||
|
<span class="required">*</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="py-2 pr-3">
|
||||||
|
{{ form.fields.publish_at.input|raw }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 px-0">
|
||||||
|
<label>
|
||||||
|
{{ form.fields.finish_at.label|raw }}
|
||||||
|
<span class="required">*</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="py-2 pr-2">
|
||||||
|
{{ form.fields.finish_at.input|raw }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<style>
|
||||||
|
.input-group {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-group .form-control {
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
flex: 1;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-group .form-control:focus, .input-group .form-control:active, .input-group .form-control:hover {
|
||||||
|
z-index: 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-group-addon:not(:first-child):not(:last-child),
|
||||||
|
.input-group-btn:not(:first-child):not(:last-child),
|
||||||
|
.input-group .form-control:not(:first-child):not(:last-child) {
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-group-addon,
|
||||||
|
.input-group-btn {
|
||||||
|
white-space: nowrap;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-group-addon {
|
||||||
|
padding: 0.5rem 0.75rem;
|
||||||
|
margin-bottom: 0;
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: normal;
|
||||||
|
line-height: 1.25;
|
||||||
|
color: #55595c;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #eceeef;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||||
|
border-radius: 0.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-group-addon.form-control-sm,
|
||||||
|
.input-group-sm > .input-group-addon,
|
||||||
|
.input-group-sm > .input-group-btn > .input-group-addon.btn {
|
||||||
|
padding: 0.25rem 0.5rem;
|
||||||
|
font-size: 0.875rem;
|
||||||
|
border-radius: 0.1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-group-addon.form-control-lg,
|
||||||
|
.input-group-lg > .input-group-addon,
|
||||||
|
.input-group-lg > .input-group-btn > .input-group-addon.btn {
|
||||||
|
padding: 0.75rem 1.5rem;
|
||||||
|
font-size: 1.25rem;
|
||||||
|
border-radius: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-group-addon input[type=radio],
|
||||||
|
.input-group-addon input[type=checkbox] {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{% if not setting_value('visiosoft.module.advs::hide_options_field') %}
|
{% if not setting_value('visiosoft.module.advs::hide_options_field') %}
|
||||||
{% if not setting_value('visiosoft.module.advs::detailed_product_options') %}
|
{% if not setting_value('visiosoft.module.advs::detailed_product_options') %}
|
||||||
<div id="simpleOptionsInput" class="w-100 select-options">
|
<div id="simpleOptionsInput" class="w-100 select-options">
|
||||||
|
|||||||
@ -27,7 +27,7 @@ class AdvFormBuilder extends FormBuilder
|
|||||||
{
|
{
|
||||||
$requiredFields = setting_value('visiosoft.module.advs::make_all_fields_required');
|
$requiredFields = setting_value('visiosoft.module.advs::make_all_fields_required');
|
||||||
|
|
||||||
return [
|
$fields = [
|
||||||
'name' => [
|
'name' => [
|
||||||
'translatable' => true,
|
'translatable' => true,
|
||||||
'required' => true,
|
'required' => true,
|
||||||
@ -84,5 +84,18 @@ class AdvFormBuilder extends FormBuilder
|
|||||||
'adv_day',
|
'adv_day',
|
||||||
'product_options_value'
|
'product_options_value'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (setting_value('visiosoft.module.advs::show_finish_and_publish_date')) {
|
||||||
|
$fields = array_merge($fields, [
|
||||||
|
'finish_at' => [
|
||||||
|
'required' => true,
|
||||||
|
],
|
||||||
|
'publish_at' => [
|
||||||
|
'required' => true,
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $fields;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,11 +17,18 @@ class Approve extends ActionHandler
|
|||||||
|
|
||||||
if ($ad = $model->newQuery()->find($id)) {
|
if ($ad = $model->newQuery()->find($id)) {
|
||||||
|
|
||||||
$ad->update([
|
$update = [
|
||||||
'status' => 'approved',
|
'status' => 'approved',
|
||||||
'finish_at' => date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s') . ' + ' . $defaultAdPublishTime . ' day')),
|
];
|
||||||
'publish_at' => date('Y-m-d H:i:s')
|
|
||||||
]);
|
if (!setting_value('visiosoft.module.advs::show_finish_and_publish_date')) {
|
||||||
|
$update = array_merge($update, [
|
||||||
|
'finish_at' => date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s') . ' + ' . $defaultAdPublishTime . ' day')),
|
||||||
|
'publish_at' => date('Y-m-d H:i:s')
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$ad->update($update);
|
||||||
|
|
||||||
event(new ChangedStatusAd($ad));//Create Notify
|
event(new ChangedStatusAd($ad));//Create Notify
|
||||||
}
|
}
|
||||||
|
|||||||
@ -844,11 +844,19 @@ class AdvsController extends PublicController
|
|||||||
|
|
||||||
if (setting_value('visiosoft.module.advs::auto_approve') && $autoApprove) {
|
if (setting_value('visiosoft.module.advs::auto_approve') && $autoApprove) {
|
||||||
$defaultAdPublishTime = setting_value('visiosoft.module.advs::default_published_time');
|
$defaultAdPublishTime = setting_value('visiosoft.module.advs::default_published_time');
|
||||||
$adv->update([
|
|
||||||
|
$update = [
|
||||||
'status' => 'approved',
|
'status' => 'approved',
|
||||||
'finish_at' => date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s') . ' + ' . $defaultAdPublishTime . ' day')),
|
];
|
||||||
'publish_at' => date('Y-m-d H:i:s')
|
|
||||||
]);
|
if (!setting_value('visiosoft.module.advs::show_finish_and_publish_date')) {
|
||||||
|
$update = array_merge($update, [
|
||||||
|
'finish_at' => date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s') . ' + ' . $defaultAdPublishTime . ' day')),
|
||||||
|
'publish_at' => date('Y-m-d H:i:s')
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
$adv->update($update);
|
||||||
}
|
}
|
||||||
|
|
||||||
$form->render($this->request->update_id);
|
$form->render($this->request->update_id);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user