Bug 31337 - No visible feedback if form input is invalid
No visible feedback if form input is invalid
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 3.1
Other Linux
: P1 normal (vote)
: UCS 3.1-1-errata
Assigned To: Jascha Geerds
Alexander Kläser
:
: 31585 31716 (view as bug list)
Depends on: 30091 30109
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-10 17:22 CEST by Alexander Kläser
Modified: 2013-07-19 18:05 CEST (History)
7 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Usability
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kläser univentionstaff 2013-05-10 17:22:12 CEST
This fix leads to a problem with the general validation of form elements. Upon validation, form elements are not anymore marked with a little exclamation mark to indicated that the chosen input is invalid. Workaround could be the following redefinition of umc/widgets/_FormWidgetMixin:validate():

validate: function() {
    var val = this.inherited(arguments);
    if (val === undefined) {
        return this.isValid();
    }
    return val;
}


+++ This bug was initially created as a clone of Bug #30109 +++

A form.validate() iterates over all form widgets and validates them. This is
done via widget.validate(). If this function is not found, the widget is
silently skipped, producing Bugs like the cloned one.

Every widget should implement a validate() function. At least PasswordInputBox
and TimeBox lack this functionality. In general, Widgets that encapsulate
dijit.form.Widgets through ContainerWidgets are prone to this error.

In addition, the form.validate() function should not skip a widget without
validate(), but instead fall back to isValid() and console.warn() the developer
(if not throw an exception...). This way we can also handle future Widgets that
forgot to implement the function.

+++ This bug was initially created as a clone of Bug #30091 +++

* It is possible to set an empty password for new users.
* It is not validated whether the first password matches the second. A red
exclamation mark may appear but that does not prevent the form from being
submitted. The first password input is chosen as the password.
Comment 1 Alexander Kläser univentionstaff 2013-05-30 15:21:50 CEST
*** Bug 31585 has been marked as a duplicate of this bug. ***
Comment 2 Jascha Geerds univentionstaff 2013-06-10 14:21:44 CEST
The patch has been applied.

- ucs3.1-1 & YAML:
univention-management-console-frontend (2.0.244-11)

- ucs3.2-0 & Changelog:
univention-management-console-frontend (2.0.257-1)
Comment 3 Alexander Kläser univentionstaff 2013-06-11 15:23:37 CEST
I found a validation problem which is UDM specific → Bug 31716

isValid() checks first whether an invalid state is forced (via the property "valid"). This should be done in validate(), as well (before calling its super method).

If this is done, we should be able to remove _isValidSubset() in umc/widgets/_FormWidgetMixin as it does not seem to apply here. Its super method in dijit/form/ValidationTextBox respects the outcome of isValid. But this does not need to be done via this Bug.
Comment 4 Jascha Geerds univentionstaff 2013-06-11 15:48:40 CEST
As discussed, the behavior seems to be ok → Fixed
Comment 5 Alexander Kläser univentionstaff 2013-06-11 16:23:26 CEST
Erratum 3.1-1
  changes: OK
  YAML file: OK
UCS 3.2
  changes: Please increase first version number of source package → FAIL
  changelog: OK

All in all ok, only the debian changelog number needs to be increased.
Comment 6 Jascha Geerds univentionstaff 2013-06-11 16:32:14 CEST
(In reply to Alexander Kläser from comment #5)
> All in all ok, only the debian changelog number needs to be increased.

Done!
Comment 7 Alexander Kläser univentionstaff 2013-06-11 16:33:16 CEST
OK → VERIFIED
Comment 8 Janek Walkenhorst univentionstaff 2013-06-13 14:37:07 CEST
http://errata.univention.de/ucs/3.1/123.html
Comment 9 Alexander Kläser univentionstaff 2013-07-19 18:05:45 CEST
*** Bug 31716 has been marked as a duplicate of this bug. ***