Пример #1
0
def ImageFieldWidget(field, request):  # pylint: disable=invalid-name
    """Form image button widget factory adapter"""
    image = FieldWidget(field, ImageWidget(request))
    image.value = field.title
    # Get the full resource URL for the image:
    image.src = to_unicode(field.image)
    return image
Пример #2
0
def ButtonFieldWidget(field, request):  # pylint: disable=invalid-name
    """Simple form button widget factory adapter"""
    button = FieldWidget(field, ButtonWidget(request))
    button.value = field.title
    return button
Пример #3
0
def SubmitFieldWidget(field, request):  # pylint: disable=invalid-name
    """Form submit button factory adapter"""
    submit = FieldWidget(field, SubmitWidget(request))
    submit.value = field.title
    return submit