Univention Bugzilla – Bug 30965
"Save" button in UCS@school computerroom does not work after update to UCS 3.1-1
Last modified: 2013-04-09 16:58:42 CEST
The "Save" button in the UCS@school UMC module "Room Management" does not work after update to UCS 3.1-1. On click nothing happens.
Regression caused by Bug#30109: MultiObjectSelect does not have a isValid method, so it is "invalid". If one clicks on "Save", something does happen: The form is validated, regarded as invalid and saving the room is aborted.
The following Widgets are FormWidgets, but we do not implement isValid: for f in $(grep isValid: *.js -L); do grep _FormWidgetMixin $f -l; done CheckBox.js ComboBox.js HiddenInput.js Image.js MultiObjectSelect.js MultiSelect.js MultiUploader.js NumberSpinner.js PasswordBox.js TextArea.js TextBox.js UnixAccessRights.js Uploader.js Note that in some cases (e.g. TextBox), the Dojo base class does implement it. We could write isValid for all of these Widgets (just returning true, probably), or we could test if isValid exists in a BaseClass and return true otherwise: _FormWidgetMixin.isValid: [...] + var superIsValid = this.inherited(arguments, true); + if (superIsValid !== undefined) { + return superIsValid.apply(this, arguments); + } else { + console.warn(this.declaredClass, "does not implement isValid(); return true"); + return true; + } - return this.inherited(arguments); Note that this is also an API change, since some Widgets currently return undefined, but I would say that this is much cleaner (maybe remove the warning) and also holds for future Widgets. I have validated an UDM-Form (users/user) (note that this is not done in udm, I had to do it manually): umc.widgets.HiddenInput does not implement isValid(); return true umc.widgets.PasswordInputBox does not implement isValid(); return true umc.modules.udm.MultiObjectSelect does not implement isValid(); return true umc.widgets.MultiSelect does not implement isValid(); return true Error message from PasswordInputBox is caused by an unneeded this.inherited() in its own isValid().
Fixed in univention-management-console-frontend 2.0.244-2.617.201304031313 resp univention-management-console-frontend 2.0.245-1.616.201304031212 YAML and Changelog created
== QA == I added in the frontend package the test file tests/form_widgets.html which integrates all Form-Elements (except MixedInput, but this can be neglected). By default, all elements validate to true → OK PasswordInputBox does not validate to false for two differing entries → FAIL
(In reply to comment #4) > PasswordInputBox does not validate to false for two differing entries → FAIL I should listen to myself! (In reply to comment #2) > Error message from PasswordInputBox is caused by an unneeded this.inherited() > in its own isValid(). Fixed in: univention-management-console-frontend 2.0.247-1.618.201304041328 resp univention-management-console-frontend 2.0.244-3.619.201304041347
== QA == (In reply to comment #5) > I should listen to myself! True :) ! > Fixed in: > univention-management-console-frontend 2.0.247-1.618.201304041328 > resp > univention-management-console-frontend 2.0.244-3.619.201304041347 Erratum changes: OK YAML file: OK 3.1-2 changes: OK 3.1-1 Changelog: OK
http://errata.univention.de/3.1-errata83.html