apply patch proposed by 2web to properly remove hidden input set to represent the button used to submit the form, so forms may be properly reused after a post
--- a/web/data/cubicweb.edition.js Tue Jan 19 18:22:05 2010 +0100
+++ b/web/data/cubicweb.edition.js Tue Jan 19 18:26:22 2010 +0100
@@ -414,12 +414,15 @@
function postForm(bname, bvalue, formid) {
var form = getNode(formid);
if (bname) {
- form.appendChild(INPUT({type: 'hidden', name: bname, value: bvalue}));
+ var child = form.appendChild(INPUT({type: 'hidden', name: bname, value: bvalue}));
}
var onsubmit = form.onsubmit;
if (!onsubmit || (onsubmit && onsubmit())) {
form.submit();
}
+ if (bname) {
+ jQuery(child).remove(); /* cleanup */
+ }
}