Skip to content

Commit 7b3bf18

Browse files
fix: image upload in image dropdown field
1 parent c1ddb20 commit 7b3bf18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/admin/ppom-admin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,7 @@ jQuery(function($) {
759759
var price_metatype = 'price';
760760
var stock_metatype = 'stock';
761761
var stock_placeholder = ppom_vars.i18n.stock;
762+
let url_field = '<input placeholder="url" type="text" name="ppom[' + field_index + '][' + meta_type + '][' + option_index + '][url]" class="form-control" data-opt-index="' + option_index + '" data-metatype="url" value="">';
762763

763764
// Set name key for imageselect addon
764765
if (meta_type == 'imageselect') {
@@ -779,14 +780,13 @@ jQuery(function($) {
779780
var condidtion_attr = 'image_options';
780781
price_placeholder = ppom_vars.i18n.metaIds;
781782
price_metatype = 'meta_id';
783+
url_field = '<input placeholder="url" type="text" name="ppom[' + field_index + '][' + meta_type + '][' + option_index + '][url]" class="form-control" data-opt-index="' + option_index + '" data-metatype="url" value="">';
782784
}
783785
else {
784786
var class_name = '';
785787
var condidtion_attr = '';
786788
}
787789

788-
let url_field = '<input placeholder="url" type="text" name="ppom[' + field_index + '][' + meta_type + '][' + option_index + '][url]" class="form-control" data-opt-index="' + option_index + '" data-metatype="url" value="">';
789-
790790
if (meta.type !== 'image') {
791791
img_icon = '<img width="60" src="' + meta.icon + '" style="width: 34px;">';
792792
url_field = '';

0 commit comments

Comments
 (0)