Wrap a widget to conform with Bootstrap's html control design.
    
    
    Args:
        input_class: Class to give to the rendered <input> control.
        add_meta: bool:

def bootstrap_styled(cls=None, add_meta=True, form_group=True, 
    input_class='form-control'):
    """
    Wrap a widget to conform with Bootstrap's html control design.
    
    
    Args:
        input_class: Class to give to the rendered <input> control.
        add_meta: bool: 
    """

    def real_decorator(cls):
        class NewClass(cls): pass
        NewClass.__name__ = cls.__name__
        NewClass = custom_widget_wrapper(NewClass)

        _call = NewClass.__call__

        def call(*args, **kwargs):
            if input_class:
                kwargs.setdefault('class', input_class)

            return _call(*args, **kwargs)

        if add_meta: call = meta_wrapped(call)
        if form_group: call = form_group_wrapped(call)

        NewClass.__call__ = call
        return NewClass

    if cls:
        # Allow calling decorator(cls) instead of decorator()(cls)
        rv = real_decorator(cls)
        return rv

    return real_decorator