mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-24 22:11:01 -06:00
#4590 yenikurs.ocify.site improvments
This commit is contained in:
parent
3d56766796
commit
0396525fa7
@ -60,7 +60,6 @@ return [
|
|||||||
'hide_standard_price_field',
|
'hide_standard_price_field',
|
||||||
'hide_options_field',
|
'hide_options_field',
|
||||||
'hide_village_field',
|
'hide_village_field',
|
||||||
'hide_configurations',
|
|
||||||
'make_all_fields_required',
|
'make_all_fields_required',
|
||||||
'make_map_required',
|
'make_map_required',
|
||||||
'show_breadcrumb_when_creating_ad',
|
'show_breadcrumb_when_creating_ad',
|
||||||
|
|||||||
@ -146,13 +146,6 @@ return [
|
|||||||
'mode' => 'checkbox'
|
'mode' => 'checkbox'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'hide_configurations' => [
|
|
||||||
'type' => 'anomaly.field_type.boolean',
|
|
||||||
'config' => [
|
|
||||||
'default_value' => false,
|
|
||||||
'mode' => 'checkbox'
|
|
||||||
]
|
|
||||||
],
|
|
||||||
'make_all_fields_required' => [
|
'make_all_fields_required' => [
|
||||||
'type' => 'anomaly.field_type.boolean',
|
'type' => 'anomaly.field_type.boolean',
|
||||||
'config' => [
|
'config' => [
|
||||||
|
|||||||
@ -133,7 +133,7 @@ label {
|
|||||||
color: #4A4A4A;
|
color: #4A4A4A;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
|
|
||||||
input {
|
input, textarea {
|
||||||
box-shadow: 0 calc(1rem / 16) calc(2rem / 16) rgba(0, 0, 0, .04);
|
box-shadow: 0 calc(1rem / 16) calc(2rem / 16) rgba(0, 0, 0, .04);
|
||||||
font-size: calc(17rem / 16);
|
font-size: calc(17rem / 16);
|
||||||
padding: 1.1rem 1.5rem;
|
padding: 1.1rem 1.5rem;
|
||||||
|
|||||||
@ -79,7 +79,7 @@
|
|||||||
</label>
|
</label>
|
||||||
|
|
||||||
{% if setting_value('visiosoft.module.advs::market_place') %}
|
{% if setting_value('visiosoft.module.advs::market_place') %}
|
||||||
{{ addBlock('new-ad/fields', {'adv': adv})|raw }}
|
{{ addBlock('new-ad/fields', {'adv': adv, 'rawClassified': rawClassified})|raw }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div id="priceInput" class="d-flex justify-content-between mb-4 flex-wrap">
|
<div id="priceInput" class="d-flex justify-content-between mb-4 flex-wrap">
|
||||||
|
|||||||
@ -551,4 +551,23 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
|||||||
->where('status', '=', 'approved')
|
->where('status', '=', 'approved')
|
||||||
->where('slug', '!=', '');
|
->where('slug', '!=', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setConfig($key, $value)
|
||||||
|
{
|
||||||
|
$config = $this->config;
|
||||||
|
$config = $config ? (array) json_decode($config) : [];
|
||||||
|
|
||||||
|
$config[$key] = $value;
|
||||||
|
|
||||||
|
$this->config = json_encode($config);
|
||||||
|
$this->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getConfig($key)
|
||||||
|
{
|
||||||
|
$config = $this->config;
|
||||||
|
$config = $config ? (array) json_decode($config) : [];
|
||||||
|
|
||||||
|
return $config[$key] ?? null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -277,7 +277,6 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
|
|||||||
->where('advs_advs.id', $id)
|
->where('advs_advs.id', $id)
|
||||||
->leftJoin('users_users as u1', 'advs_advs.created_by_id', '=', 'u1.id')
|
->leftJoin('users_users as u1', 'advs_advs.created_by_id', '=', 'u1.id')
|
||||||
->select('advs_advs.*', 'u1.first_name as first_name', 'u1.last_name as last_name', 'u1.id as owner_id')
|
->select('advs_advs.*', 'u1.first_name as first_name', 'u1.last_name as last_name', 'u1.id as owner_id')
|
||||||
->inRandomOrder()
|
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
if ($adv) {
|
if ($adv) {
|
||||||
|
|||||||
@ -99,4 +99,8 @@ interface AdvInterface extends EntryInterface
|
|||||||
public function lastCategory();
|
public function lastCategory();
|
||||||
|
|
||||||
public function scopeCurrent($query);
|
public function scopeCurrent($query);
|
||||||
|
|
||||||
|
public function setConfig($key, $value);
|
||||||
|
|
||||||
|
public function getConfig($key);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -769,7 +769,8 @@ class AdvsController extends PublicController
|
|||||||
}
|
}
|
||||||
|
|
||||||
return $this->view->make('visiosoft.module.advs::new-ad/new-create', compact(
|
return $this->view->make('visiosoft.module.advs::new-ad/new-create', compact(
|
||||||
'request', 'formBuilder', 'cats_d', 'custom_fields'));
|
'formBuilder', 'cats_d', 'custom_fields'
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function store
|
public function store
|
||||||
@ -840,6 +841,10 @@ class AdvsController extends PublicController
|
|||||||
$adv->is_get_adv = ($this->request->is_get_adv and $get_categories_status) ? true : false;
|
$adv->is_get_adv = ($this->request->is_get_adv and $get_categories_status) ? true : false;
|
||||||
$adv->save();
|
$adv->save();
|
||||||
|
|
||||||
|
if ($adv->is_get_adv) {
|
||||||
|
$orderNote = \request('order_note') ?? '';
|
||||||
|
$adv->setConfig('order_note', trim($orderNote));
|
||||||
|
}
|
||||||
|
|
||||||
//Todo Create Event
|
//Todo Create Event
|
||||||
if (is_module_installed('visiosoft.module.customfields')) {
|
if (is_module_installed('visiosoft.module.customfields')) {
|
||||||
@ -956,6 +961,7 @@ class AdvsController extends PublicController
|
|||||||
public function edit($id)
|
public function edit($id)
|
||||||
{
|
{
|
||||||
$adv = $this->adv_repository->find($id);
|
$adv = $this->adv_repository->find($id);
|
||||||
|
$rawClassified = $adv;
|
||||||
|
|
||||||
if (is_null($adv)) {
|
if (is_null($adv)) {
|
||||||
$this->messages->error(trans('visiosoft.module.advs::message.no_add_found'));
|
$this->messages->error(trans('visiosoft.module.advs::message.no_add_found'));
|
||||||
@ -1011,7 +1017,10 @@ class AdvsController extends PublicController
|
|||||||
|
|
||||||
return $this->view->make(
|
return $this->view->make(
|
||||||
'visiosoft.module.advs::new-ad/new-create',
|
'visiosoft.module.advs::new-ad/new-create',
|
||||||
compact('id', 'cats_d', 'cats', 'adv', 'custom_fields', 'options', 'hidePrice','is_options', 'configurations')
|
compact(
|
||||||
|
'id', 'cats_d', 'cats', 'adv', 'custom_fields', 'options',
|
||||||
|
'hidePrice','is_options', 'configurations', 'rawClassified'
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user