class documentation
class ThreeWayToggleWidget(forms.RadioSelect):
Constructor: ThreeWayToggleWidget(attrs, choices, option_attrs, label, tooltip)
Widget that renders the three-way toggle button.
It also allows to set the attributes of the individual inputs (radio buttons) as
option_attrs
as well as the attributes of the container as attrs.
Method | __init__ |
Store arguments and option attributes for later use. |
Method | create |
Pass the option attributes to the actual options. |
Method | get |
Pass label and tooltip to the context variable. |
Class Variable | option |
HTML template that renders the individual options of the button. |
Class Variable | template |
HTML template that renders the button containing its three options. |
Instance Variable | label |
Undocumented |
Instance Variable | option |
HTML attributes. Also adds the call to a JS function. |
Instance Variable | tooltip |
Undocumented |