Просмотр исходного кода

#3489 Multi-categories: "Create own category" isn't working correctly when more than one form of the same page with multi-categories fiels

RomanL 5 лет назад
Родитель
Сommit
e7d00c0c59
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      inc/js/classes/BxDolCategories.js

+ 1 - 1
inc/js/classes/BxDolCategories.js

@@ -35,7 +35,7 @@ BxDolCategories.prototype.categoryAddNew = function (oButton, sName) {
     oCategory.find("input[type = 'text']").val('');
     oCategory.find("input[type = 'hidden']").remove();
 
-    $('.bx-form-input-categories .bx-form-input-category-add:first').before(oCategory);
+    oButton.parents('#bx-form-element-' + sName).find('.bx-form-input-categories .bx-form-input-category-add:first').before(oCategory);
 };
 
 BxDolCategories.prototype.categoryDelete = function (oButton) {