mirror of
https://github.com/pretix/pretix.git
synced 2025-12-23 17:02:26 +00:00
Compare commits
1 Commits
mail-setti
...
item-plugi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b7aed9557 |
@@ -310,9 +310,13 @@ an instance of a form class that you bind yourself when appropriate. Your form w
|
|||||||
as part of the standard validation and rendering cycle and rendered using default bootstrap
|
as part of the standard validation and rendering cycle and rendered using default bootstrap
|
||||||
styles. It is advisable to set a prefix for your form to avoid clashes with other plugins.
|
styles. It is advisable to set a prefix for your form to avoid clashes with other plugins.
|
||||||
|
|
||||||
Your forms may also have two special properties: ``template`` with a template that will be
|
Your forms may also have special properties:
|
||||||
included to render the form, and ``title``, which will be used as a headline. Your template
|
|
||||||
will be passed a ``form`` variable with your form.
|
- ``template`` with a template that will be included to render the form. Your template will be passed a ``form``
|
||||||
|
variable with your form.
|
||||||
|
- ``title``, which will be used as a headline.
|
||||||
|
- ``ìs_layouts = True``, if your form should be grouped with the ticket layout settings (mutually exclusive with setting ``title``).
|
||||||
|
- ``group_with_formset = True``, if your form should be grouped with a formset of the same ``title``
|
||||||
|
|
||||||
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
As with all event plugin signals, the ``sender`` keyword argument will contain the event.
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -177,6 +177,18 @@
|
|||||||
{% for v in formsets.values %}
|
{% for v in formsets.values %}
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{{ v.title }}</legend>
|
<legend>{{ v.title }}</legend>
|
||||||
|
|
||||||
|
{% for f in plugin_forms %}
|
||||||
|
{% if f.group_with_formset and f.title == v.title %}
|
||||||
|
{% if f.template and not "template" in f.fields %}
|
||||||
|
{% include f.template with form=f %}
|
||||||
|
{% else %}
|
||||||
|
{% bootstrap_form f layout="control" %}
|
||||||
|
{% endif %}
|
||||||
|
<hr />
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
{% include v.template with formset=v %}
|
{% include v.template with formset=v %}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@@ -276,7 +288,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
{% for f in plugin_forms %}
|
{% for f in plugin_forms %}
|
||||||
{% if not f.is_layouts and f.title %}
|
{% if not f.is_layouts and not f.group_with_formset and f.title %}
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{{ f.title }}</legend>
|
<legend>{{ f.title }}</legend>
|
||||||
{% if f.template and not "template" in f.fields %}
|
{% if f.template and not "template" in f.fields %}
|
||||||
|
|||||||
Reference in New Issue
Block a user