mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 23:06:08 -06:00
alibaba is_buying settings changed
This commit is contained in:
parent
ca06b82a5d
commit
67abf4b941
@ -1,22 +0,0 @@
|
|||||||
$(() => {
|
|
||||||
if (buying_selling_title) {
|
|
||||||
getCfValue(buying_selling_title)
|
|
||||||
}
|
|
||||||
var is_buying_selling_title = $('#is_buying_selling_title');
|
|
||||||
is_buying_selling_title.on('change', () => {
|
|
||||||
if (is_buying_selling_title.val()) {
|
|
||||||
getCfValue(is_buying_selling_title.val())
|
|
||||||
}
|
|
||||||
})
|
|
||||||
});
|
|
||||||
|
|
||||||
function getCfValue(cf) {
|
|
||||||
crudAjax(null, `/ajax/get-cf-value/${cf}`, 'GET', function (callback) {
|
|
||||||
$('select[name="is_buying_value"]').html("<option value=''>" + pick_option + "</option>");
|
|
||||||
$('select[name="is_selling_value"]').html("<option value=''>" + pick_option + "</option>");
|
|
||||||
$.each(callback, function (index, value) {
|
|
||||||
$('select[name="is_buying_value"]').append(`<option value='${value.id}' ${value.id == is_buying ? 'selected' : ''}>${value.custom_field_value}</option>`)
|
|
||||||
$('select[name="is_selling_value"]').append(`<option value='${value.id}' ${value.id == is_selling ? 'selected' : ''}>${value.custom_field_value}</option>`)
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
<div class="card">
|
|
||||||
|
|
||||||
{% include "streams::form/partials/header" with {"section": section} %}
|
|
||||||
|
|
||||||
<div class="card-block card-body">
|
|
||||||
|
|
||||||
{% include "streams::form/partials/fields" with {"fields": form.fields.base().pluck('field_name').all()} %}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
var buying_selling_title = "{{ setting_value('visiosoft.theme.alibaba::is_buying_selling_title') }}",
|
|
||||||
is_buying = "{{ setting_value('visiosoft.theme.alibaba::is_buying_value') }}",
|
|
||||||
is_selling = "{{ setting_value('visiosoft.theme.alibaba::is_selling_value') }}",
|
|
||||||
pick_option = "{{ trans('visiosoft.theme.alibaba::field.pick_option.name') }}"
|
|
||||||
</script>
|
|
||||||
{{ asset_add("scripts.js", "visiosoft.theme.defaultadmin::js/alibaba/buyingSelling.js") }}
|
|
||||||
@ -51,12 +51,6 @@ class DefaultadminThemeServiceProvider extends AddonServiceProvider
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request->segment(2) === "settings") {
|
|
||||||
return [
|
|
||||||
'streams::form/partials/default' => 'visiosoft.theme.defaultadmin::admin/settings/form/partials/default',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
return parent::getOverrides();
|
return parent::getOverrides();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user