简体   繁体   English

Symfony Sonata项目:输入文本集合JavaScript问题

[英]Symfony Sonata project: Input text collection JavaScript issue

I am trying to add collection of input texts with add/delete buttons on admin block. 我正在尝试使用管理块上的添加/删除按钮添加输入文本的集合。

The problem is when I hit add button I get new 3 or 4 or even 5 new input fields instead of one! 问题是当我按下添加按钮时,我得到了新的3或4甚至5个新的输入字段,而不是一个!

The js function setup_collection_buttons called more than once hence attached more click events on HTML element .sonata-collection-add js函数setup_collection_buttons调用,因此在HTML元素.sonata-collection-add上附加了更多点击事件

Before clicking: 点击之前

在此处输入图片说明

After : 之后

在此处输入图片说明

Any Idea why ? 知道为什么吗?

It seems to be a bug. 这似乎是一个错误。 I filed issue against AdminBundle 我针对AdminBundle提出了问题

Issue on github 在github上发布

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM