a12978bee59b9db1891545fe065fcfaafe2dea94 tdreszer Mon Dec 19 14:09:16 2011 -0800 Turns out at least on browser (linux/FF) sends unnamed inputs to the cart. Therefore, unchanged controls are no 'disabled' before submit. diff --git src/hg/js/subCfg.js src/hg/js/subCfg.js index ee87fa1..f4ed693 100644 --- src/hg/js/subCfg.js +++ src/hg/js/subCfg.js @@ -848,26 +848,27 @@ $(this).change(function (e) { subCfg.markChange(e,this); subCfg.propagateSetting(this); }); } }); } // Because of fauxDisabled subCBs, it is necessary to truly disable them before submitting. $("FORM").submit(function (i) { $('input.subCB.changed.disabled').attr('disabled',true); // shadows will go to cart as they should // Names will be removed for all controls that have not changed $('select,input').filter("[name]").not(".allOrOnly").not('.changed').each( function (i) { - if (this.type != 'hidden' || $(this).hasClass('trPos') || $(this).hasClass('cbShadow') || $(this).hasClass('sortOrder')) { + if (this.type != 'hidden' || $(this).hasClass('trPos') + || $(this).hasClass('cbShadow') || $(this).hasClass('sortOrder')) { // hiddens except priority and boolshad are all sent to the cart - //this.disabled = true; // QESTION: which is better: name or disabled ? - this.name = ""; // Unname goes straight to the point: doesn't send in the form + // disable instead of unname because unname fills cart with a lot of garbage (Linux/FF)! + this.disabled = true; } }); // to do: other hiddens? }); } };