selective merge with master

This commit is contained in:
Artur Barseghyan 2019-06-19 22:31:32 +02:00
parent 249f87a739
commit abd0c42fbf
3 changed files with 12 additions and 14 deletions

View file

@ -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.

View file

@ -68,8 +68,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
{% url 'fobi.dashboard' as fobi_dashboard_url %}
<a class="navbar-brand" href="{{ fobi_dashboard_url }}">{{ fobi_theme.project_name }}</a>
<a class="navbar-brand" href="{% url 'fobi.dashboard' %}">{{ fobi_theme.project_name }}</a>
</div>
{% endblock navbar-header %}

View file

@ -13,12 +13,7 @@
<ul class="title-area">
<li class="name">
<h1>
{% url 'fobi.dashboard' as fobi_dashboard_url %}
<a href="{{ fobi_dashboard_url }}">
{{ fobi_theme.project_name }}
</a>
</h1>
<h1><a href="{% url 'fobi.dashboard' %}">{{ fobi_theme.project_name }}</a></h1>
</li>
<li class="toggle-topbar menu-icon"><a href="#"><span>menu</span></a></li>
@ -81,10 +76,7 @@
<!-- Title Area -->
<li class="name">
{% url 'fobi.dashboard' as fobi_dashboard_url %}
<h1>
<a href="{{ fobi_dashboard_url }}">{{ fobi_theme.project_name }}</a>
</h1>
<h1><a href="{% url 'fobi.dashboard' %}">{{ fobi_theme.project_name }}</a></h1>
</li>
<li class="toggle-topbar menu-icon">