[Zope3-Users] label customisation

Simon Elbaz elbazsimon9 at gmail.com
Fri Jul 19 15:06:39 CEST 2013


It's not the most elegant way but it does the job:

    def updateWidgets(self):
        super(StepAddForm, self).updateWidgets()
        AddAction = button.StaticButtonActionAttribute(
            u'Add Action',
button=self.widgets['o_action_list'].buttons['add'])
        zope.component.provideAdapter(factory=AddAction, name='title')
        super(StepAddForm, self).updateWidgets()


where o_action_list is the zope.schema.List field.

I have to call super(StepAddForm, self).updateWidgets() because
self.widgets is not avalaible before the call.

Regards,
Simon


On Sun, Jul 14, 2013 at 3:12 AM, Simon Elbaz <elbazsimon9 at gmail.com> wrote:

> Hi,
>
> In the z3c.form.AddForm, zope.schema.List field is rendered with
> Add/Delete buttons.
>
> How to customize those labels ?
>
> My code does not have any effect:
> AddAction = button.StaticButtonActionAttribute(
>     u'Add Action', button=multi.MultiWidget.buttons['add'],
>         form=StepAddForm)
>
> Thanks for your help
> Simon Elbaz
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.zope.org/pipermail/zope3-users/attachments/20130719/ce23ea4c/attachment.html>


More information about the Zope3-users mailing list