<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 07/07/2011 04:46 PM, Adam Young wrote:
<blockquote cite="mid:4E161B36.5060009@redhat.com" type="cite">No
longer testing on blur, as it was causing to many issues. Now
checking upon click of the add button.
<br>
<br>
<br>
<br>
<br>
On 07/07/2011 12:05 AM, Endi Sukma Dewata wrote:
<br>
<blockquote type="cite">On 7/6/2011 7:56 PM, Adam Young wrote:
<br>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">1. The check_required() is only
called in blur events. It's not
<br>
called on Add/Update.
<br>
</blockquote>
<br>
Fixed. Looks like this works even for checkboxes.
<br>
</blockquote>
</blockquote>
<br>
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.
<br>
<br>
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?
<br>
<br>
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.
<br>
<br>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">2. In IPA.entity_select_widget the
check_required() is only called if
<br>
the widget is editable.
<br>
</blockquote>
</blockquote>
</blockquote>
<br>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">To test, open IPA Server ->
Configuration, set the Default user group
<br>
to empty, then click somewhere else. There's no validation
error.
<br>
</blockquote>
</blockquote>
</blockquote>
<br>
<blockquote type="cite">
<blockquote type="cite">Fixed, but I don't think that there is
currently a testable case for
<br>
this, as many things don't have required set.
<br>
</blockquote>
</blockquote>
<br>
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.
<br>
<br>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">3. Also in IPA.entity_select_widget
the check_required() is only
<br>
called from the text input's blur event, not from the drop
down list.
<br>
This leads to strange behavior:
<br>
</blockquote>
</blockquote>
</blockquote>
<br>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">Open the hosts' adder dialog, click
the drop down list, the
<br>
validation error will appear before the user has a chance
to select a
<br>
value.
<br>
</blockquote>
</blockquote>
</blockquote>
<br>
<blockquote type="cite">
<blockquote type="cite">Again fixed ,but not sure it is
verifiable. host and service add don't
<br>
seem to have metadata for required.
<br>
</blockquote>
</blockquote>
<br>
This can be verified with the above scenario. The host's fqdn is
required. The problem still exists.
<br>
<br>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">4. For consistency, the
multivalued_text and textarea widgets can be
<br>
modified to call the create_error_link() to create the
error_link
<br>
element.
<br>
</blockquote>
</blockquote>
</blockquote>
<br>
<blockquote type="cite">
<blockquote type="cite">done
<br>
</blockquote>
</blockquote>
<br>
The IPA.multivalued_text_widget is still creating it's own
error_link.
<br>
<br>
</blockquote>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Freeipa-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Freeipa-devel@redhat.com">Freeipa-devel@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/freeipa-devel">https://www.redhat.com/mailman/listinfo/freeipa-devel</a></pre>
</blockquote>
<br>
</body>
</html>