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(self, event)¶
- onBoneChange(self, bone)¶
- _setModulename(self, val)¶
- _setActionname(self, val)¶
- _setFormname(self, val)¶
- buildForm(self)¶
Builds a form with save button.
- buildInternalForm(self)¶
Builds only the form.
- registerField(self, key, widget)¶
- update(self)¶
Updates current form view state regarding conditional input fields.
- submitForm(self)¶
- unserialize(self, 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(self, all=False) Dict ¶
Serializes all bone’s values into a dict to be sent to ViUR or the be evaluated.
- actionSuccess(self, req)¶
- handleErrors(self)¶
- createFormSuccessMessage(self)¶
- createFormErrorMessage(self)¶
- actionFailed(self, req, *args, **kwargs)¶
- onFormSuccess(self, event)¶
- onSubmitStatusChanged(self, value, *args, **kwargs)¶
- class flare.viur.forms.ViurFormBone(boneName=None, form=None, defaultvalue=None, hidden=False, filter=None)¶
Bases:
flare.html5.Div
- onAttach(self)¶
- onChange(self, event, *args, **kwargs)¶
- unserialize(self, data=None)¶
- serialize(self)¶
- _setBonename(self, val)¶
- _setLabel(self, val)¶
- _setPlaceholder(self, val)¶
- _setHide(self, val)¶
- _setValue(self, val)¶
- setInvalid(self, errors=None)¶
- setValid(self)¶
- 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(self)¶
- sendViurForm(self, sender=None)¶
- onSubmitStatusChanged(self, value, *args, **kwargs)¶