[Freeipa-devel] [PATCH] 0265-check-required-on-blur

Adam Young ayoung at redhat.com
Thu Jul 7 00:55:35 UTC 2011


On 07/06/2011 08:12 PM, Endi Sukma Dewata wrote:
> On 7/6/2011 4:32 PM, Adam Young wrote:
>>
>
> Some issues:
>
> 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.

>
> To test, open user's adder dialog, don't enter anything, just click 
> Add. The server will return an error (i.e. check_required() not called).
>
> Another test, edit an existing user, empty the first name, click 
> somewhere else, an error will appear because it loses focus. Then 
> click Update, the server will return an error (i.e. check_required() 
> not called).
>
> 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.
>
> 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.

>
> 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
>
> 5. There's a jslint warning.
fixed.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-admiyo-0265-2-check-required-on-blur.patch
Type: text/x-patch
Size: 6530 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20110706/340f00aa/attachment.bin>


More information about the Freeipa-devel mailing list