On 7/6/2011 7:56 PM, Adam Young wrote:
1. The check_required() is only called in blur events. It's not
called on Add/Update.

Fixed. Looks like this works even for checkboxes.

There seems to be a race condition. Open the group adder dialog, then click Add. Sometimes only group name gets an error, sometimes the description too. It looks like there are 2 events happening at the same time: input blur and button click, and both are modifying the valid attribute and the error message.

Another problem, open the group adder dialog, then click Cancel. You'll get an error and the dialog doesn't close. Is blur really a good place to check required?

Which checkboxes are you referring to? The IPA.attribute_widget is a subclass of IPA.checkboxes_widget, but it doesn't seem to check required.

2. In IPA.entity_select_widget the check_required() is only called if
the widget is editable.

To test, open IPA Server -> Configuration, set the Default user group
to empty, then click somewhere else. There's no validation error.

Fixed, but I don't think that there is currently a testable case for
this, as many things don't have required set.

This can be verified with the above scenario by setting the ipadefaultprimarygroup to required in ipa_init.json (it should have been required anyway). There's a problem, the entity_link is only created when the widget is editable.

3. Also in IPA.entity_select_widget the check_required() is only
called from the text input's blur event, not from the drop down list.
This leads to strange behavior:

Open the hosts' adder dialog, click the drop down list, the
validation error will appear before the user has a chance to select a
value.

Again fixed ,but not sure it is verifiable. host and service add don't
seem to have metadata for required.

This can be verified with the above scenario. The host's fqdn is required. The problem still exists.

4. For consistency, the multivalued_text and textarea widgets can be
modified to call the create_error_link() to create the error_link
element.

done

The IPA.multivalued_text_widget is still creating it's own error_link.

--
Endi S. Dewata

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to