flare.viur.forms
Module Contents
Classes
Handles an input form for a VIUR skeleton. |
|
Extended version for a button with a text and icon, which binds itself to an event function. |
- class flare.viur.forms.ViurForm(formName: str = None, moduleName: str = None, actionName: str = 'add', skel=None, structure=None, visible=(), ignore=(), hide=(), errors=None, context=None, *args, **kwargs)
Bases:
flare.html5.Form
Handles an input form for a VIUR skeleton.
- onChange(event)
- onBoneChange(bone)
- _setModulename(val)
- _setActionname(val)
- _setFormname(val)
- buildForm()
Builds a form with save button.
- buildInternalForm()
Builds only the form.
- registerField(key, widget)
- update()
Updates current form view state regarding conditional input fields.
- submitForm()
- unserialize(skel: Dict = None)
Unserializes a dict of values into this form. :param skel: Either a dict of values to be unserialized into this form, or None for emptying all values.
- serialize(all=False) Dict
Serializes all bone’s values into a dict to be sent to ViUR or the be evaluated.
- actionSuccess(req)
- handleErrors()
- createFormSuccessMessage()
- createFormErrorMessage()
- actionFailed(req, *args, **kwargs)
- onFormSuccess(event)
- onSubmitStatusChanged(value, *args, **kwargs)
- class flare.viur.forms.ViurFormBone(boneName=None, form=None, defaultvalue=None, hidden=False, filter=None)
Bases:
flare.html5.Div
- onAttach()
- onChange(event, *args, **kwargs)
- unserialize(data=None)
- serialize()
- _setBonename(val)
- _setLabel(val)
- _setPlaceholder(val)
- _setHide(val)
- _setValue(val)
- setInvalid(errors=None)
- setValid()
- class flare.viur.forms.ViurFormSubmit(text=None, callback=None, className='btn--submit btn--primary', icon=None, badge=None, form=None)
Bases:
flare.button.Button
Extended version for a button with a text and icon, which binds itself to an event function.
- onAttach()
- sendViurForm(sender=None)
- onSubmitStatusChanged(value, *args, **kwargs)