[Freeipa-devel] [PATCH] 0047 Honor 'enabled' option for widgets

Ana Krivokapic akrivoka at redhat.com
Mon Jul 22 14:46:35 UTC 2013


On 07/18/2013 09:47 AM, Petr Vobornik wrote:
> On 07/17/2013 09:18 PM, Ana Krivokapic wrote:
>> Hello,
>>
>> This patch addresses ticket https://fedorahosted.org/freeipa/ticket/3793.
>>
>
> Hello,
>
> 1) IMO  we should not create attribute which is just a negation of another.
>
> 2) We should add set_enabled method to base widget. Existing set_enabled
> methods should use it and maintain widget output consistent with the attribute
> (ie. one should not directly set the attr and should use set_enabled instead).
> The method should be also callable when content is not yet created. 
> get_enabled methods might become unnecessary - one can get the state form
> 'enabled' attribute.
>

The attached updated patch implements the following changes:

1) set_enabled method has been added to the base widget class.
2) get_enabled/is_enabled methods have been removed.
3) Widget classes that inherit from the base widget class override the
set_enabled method where necessary.
4) Using 'enabled: true/false' in the widget definition should now work
correctly for all types of widgets.


-- 
Regards,

Ana Krivokapic
Associate Software Engineer
FreeIPA team
Red Hat Inc.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-akrivoka-0047-02-Honor-enabled-option-for-widgets.patch
Type: text/x-patch
Size: 11305 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20130722/19f54c9e/attachment.bin>


More information about the Freeipa-devel mailing list