https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20388
--- Comment #9 from Alex Arnaud <[email protected]> --- (In reply to Jonathan Druart from comment #8) > 1. What's the point of the JS function valid_line? > I think you should double-check it, it does not do what you expect it to do. > > 2. You are reusing code to duplicate a new mapping but for something else. > You should rename the variables to avoid confusion then. > For instance "search_fields" is not an index name I wanted to reuse the code as much as possible. It is not a problem for to add a js fonction dedicated to duplicate search fields only. > > 3. Bug report's title is wrong, we are not adding/removing indices Right! > > 4. I did not implement that part on the original patch because it's hard to > keep an interface consistent. > For instance: > - create a new search field > => You cannot create a new mapping, you have to save first > - create a new search field, save > => You can delete it. So it you create a mapping using it, you can still > delete it. If you save => kaboom > => If you have a search field already mapped and delete the mapping, you > cannot delete the search field. I see 2 solutions: 1) JS code for validating data when saving and warn the user if there is something inconsistent. May be quite tricky... 2) Submit the form on clicking the "+add" button. There is a disavantage: page is reloaded between each adding. Not confortable for adding many search fields or mapping -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
