diff --git a/README.rst b/README.rst index 2043cfc2..2f1481dd 100644 --- a/README.rst +++ b/README.rst @@ -27,10 +27,11 @@ Prerequisites Key concepts ============ -- Each form consists of elements. Form elements are divided into two groups: +- Each form consists of elements. Form elements are divided into groups: (a) form fields (input field, textarea, hidden field, file field, etc.). (b) content (presentational) elements (text, image, embed video, etc.). + (c) security elements (captcha, etc). - Number of form elements is not limited. - Each form may contain handlers. Handler processes the form data (for example, @@ -706,7 +707,7 @@ Defining the Sample mail handler plugin. name = _("Sample mail") form = SampleMailForm - def run(self, form_entry, request, form): + def run(self, form_entry, request, form, form_element_entries=None): """To be executed by handler.""" send_mail( self.data.subject, @@ -716,6 +717,12 @@ Defining the Sample mail handler plugin. fail_silently=True ) +Register the plugin + +.. code-block:: python + + form_handler_plugin_registry.register(SampleMailHandlerPlugin) + Some form handlers are configurable, some others not. In order to have a user friendly way of showing the form handler settings, what's sometimes needed, a ``plugin_data_repr`` method has been introduced. diff --git a/examples/simple/templates/cms_page/base.html b/examples/simple/templates/cms_page/base.html index 0eb93a58..e0f6bb6d 100644 --- a/examples/simple/templates/cms_page/base.html +++ b/examples/simple/templates/cms_page/base.html @@ -68,8 +68,7 @@ - {% url 'fobi.dashboard' as fobi_dashboard_url %} - {{ fobi_theme.project_name }} + {{ fobi_theme.project_name }} {% endblock navbar-header %} diff --git a/examples/simple/templates/cms_page/foundation5/base.html b/examples/simple/templates/cms_page/foundation5/base.html index e612ff7f..591dcc13 100644 --- a/examples/simple/templates/cms_page/foundation5/base.html +++ b/examples/simple/templates/cms_page/foundation5/base.html @@ -13,12 +13,7 @@