mudrd8mz / moodle-tool_pluginskel

Generator of Moodle plugins skeletons
https://moodle.org/plugins/tool_pluginskel
Other
52 stars 46 forks source link

Add more ... buttons do not work with the Boost theme #78

Open mudrd8mz opened 7 years ago

mudrd8mz commented 7 years ago

The addmore.js has some presumptions on how the actual form HTML looks like when trying to duplicate the fields. However, these presumptions work with the Clean themes only. In Boost, the form HTML has different structure and the buttons do not work at all.

alexandru-elisei commented 6 years ago

I think the problem comes from the fact that the javascript parses the DOM to get the elements that it needs to duplicate.

I think the best way to fix this is to do a rewrite of the web interface by using mustache templates. This way you have more control over the element names and the html structure and you can generate the javascript code that manipulates the DOM at the same time with the html code.

mudrd8mz commented 6 years ago

I agree.