[Freeipa-devel] [PATCH] 016 Fixed: Some widgets do not have space for validation error message

Petr Vobornik pvoborni at redhat.com
Wed Sep 14 12:12:16 UTC 2011


https://fedorahosted.org/freeipa/ticket/1454

The following widgets should call create_error_link() to create a space 
to show validation error messages:

   IPA.checkbox_widget
   IPA.checkboxes_widget
   IPA.radio_widget
   IPA.select_widget
   IPA.table_widget
   IPA.attributes_widget
   IPA.rights_widget
   IPA.target_section (it's a widget)

Solution:
  * added call to checkbox, checkboxes, radio, select, table, attributes 
widget
  * rights_widget inherits it from checkboxes_widget.
  * target_section IS NOT a widget as it doesn't inherit from widget. 
It's still a section, which shows different widgets based on its state.
  * table_widget displays error_link above pagination. It looks better 
than under the table.

Attaching some sreenshots for demonstration purposes, as these changes 
aren't achievable in current UI state.
  * 1.png - checkbox and some current implementation of err. msg.
  * 2.png - radio button and demonstration of how would table_widget 
look if error msg. was under the table
  * 3.png - attributes_widget
  * 4.png - new implementation of table_widget with customized pagination

note: sreensthots are from chromium



To test table_widget you can use these JavaSript console commands

var userSection = 
IPA.entities.get('hbacrule').facets.get('details').sections.get('user');
var usersField = userSection.get_field('memberuser_user');
var groupsField = userSection.get_field('memberuser_group');
usersField.show_error('test users error message');
groupsField.show_error('test users groups error message');

groupsField.hide_error();
usersField.hide_error();


//rights_widget:
IPA.entities.get('permission').facets.get('details').sections.get('rights').fields.get('permissions').show_error('rights 
widget error');
IPA.entities.get('permission').facets.get('details').sections.get('rights').fields.get('permissions').hide_error();

//attributes_widget
IPA.entities.get('delegation').facets.get('details').sections.get('general').fields.get('attrs').show_error('attrs 
error')
IPA.entities.get('delegation').facets.get('details').sections.get('general').fields.get('attrs').hide_error()



-- 
Petr Vobornik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pvoborni-0016-Fixed-Some-widgets-do-not-have-space-for-validation-.patch
Type: text/x-patch
Size: 5515 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20110914/ca86d710/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: error-messages-01.png
Type: image/png
Size: 50876 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20110914/ca86d710/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: error-messages-02.png
Type: image/png
Size: 20140 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20110914/ca86d710/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: error-messages-03.png
Type: image/png
Size: 12017 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20110914/ca86d710/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: error-messages-05.png
Type: image/png
Size: 16169 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20110914/ca86d710/attachment-0003.png>


More information about the Freeipa-devel mailing list