mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
Merge pull request #624 from openclassify/dia
#1880 [advs-module] Add a setting to hide the standard price
This commit is contained in:
commit
8ab05d35e0
@ -34,6 +34,7 @@ return [
|
||||
'watermark_image',
|
||||
'watermark_position',
|
||||
'listing_page_image',
|
||||
'hide_standard_price_field',
|
||||
],
|
||||
],
|
||||
'user' => [
|
||||
|
||||
@ -170,6 +170,12 @@ return [
|
||||
'mode' => 'upload',
|
||||
]
|
||||
],
|
||||
'hide_standard_price_field' => [
|
||||
'type' => 'anomaly.field_type.boolean',
|
||||
'config' => [
|
||||
'default_value' => false,
|
||||
]
|
||||
],
|
||||
'enabled_currencies' => [
|
||||
'bind' => 'streams::currencies.enabled',
|
||||
'env' => 'ADV_ENABLED_CURRENCIES',
|
||||
|
||||
@ -216,7 +216,18 @@ $(document).ready(function () {
|
||||
price = parseInt(price.replace(/\./g, ''));
|
||||
let decimal = parseInt($(parent).find('.decimal-price').val());
|
||||
|
||||
$(parent).find('input[type=number]').val(parseFloat(price + "." + decimal));
|
||||
const newPrice = parseFloat(price + "." + decimal)
|
||||
let priceInput = $(parent).find('input[type=number]')
|
||||
priceInput.val(newPrice);
|
||||
|
||||
if (priceInput[0].name === 'price') {
|
||||
const event = new CustomEvent('priceChangedEvent', {
|
||||
detail: {
|
||||
newPrice
|
||||
}
|
||||
})
|
||||
document.querySelector('#price').dispatchEvent(event)
|
||||
}
|
||||
});
|
||||
|
||||
// Add dynamic option creation
|
||||
|
||||
@ -293,4 +293,7 @@ return [
|
||||
|
||||
// Select cat
|
||||
'select_category_step_by_step' => 'Select Category Step by Step',
|
||||
|
||||
// New create page
|
||||
'options' => 'Options',
|
||||
];
|
||||
|
||||
@ -118,6 +118,9 @@ return [
|
||||
'listing_page_image' => [
|
||||
'name' => 'Listing Page Image',
|
||||
],
|
||||
'hide_standard_price_field' => [
|
||||
'name' => 'Hide Standard Price Field',
|
||||
],
|
||||
'enabled_currencies' => [
|
||||
'name' => 'Enabled Currencies',
|
||||
],
|
||||
|
||||
@ -58,9 +58,10 @@
|
||||
{{ form.fields.slug|raw }}
|
||||
</div>
|
||||
</div>
|
||||
{{ addBlock('new-ad/fields',{'adv':adv})|raw }}
|
||||
|
||||
<div class="row form-group select-price">
|
||||
{{ addBlock('new-ad/fields', {'adv': adv})|raw }}
|
||||
|
||||
<div class="row form-group select-price{{ setting_value('visiosoft.module.advs::hide_standard_price_field') ? ' d-none' }}">
|
||||
<label class="col-sm-2 col-xs-12">
|
||||
{{ form.fields.standard_price.label|raw }}
|
||||
<span class="required">*</span>
|
||||
@ -118,7 +119,7 @@
|
||||
|
||||
<div class="row form-group select-options">
|
||||
<label for="selectOptions" class="col-sm-2">
|
||||
Options
|
||||
{{ trans('visiosoft.module.advs::field.options') }}
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<select id="selectOptions" class="form-control options-tags" multiple="multiple"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user