mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-14 10:00:40 +00:00
Create and use a decorator for background functions
This commit is contained in:
@ -9,6 +9,8 @@
|
||||
|
||||
{% if field.type == 'BooleanField' %}
|
||||
{{ render_boolean_field(field, *args, **kwargs) }}
|
||||
{% elif field.type == 'DecimalRangeField' %}
|
||||
{{ render_decimal_range_field(field, *args, **kwargs) }}
|
||||
{% elif field.type == 'IntegerField' %}
|
||||
{% set tmp = kwargs.update({'type': 'number'}) %}
|
||||
{% if 'class_' in kwargs and 'validate' not in kwargs['class_'] %}
|
||||
@ -42,6 +44,12 @@
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro render_decimal_range_field(field) %}
|
||||
<p class="range-field">
|
||||
{{ field(**kwargs) }}
|
||||
</p>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro render_file_field(field) %}
|
||||
<div class="file-field input-field">
|
||||
<div class="btn">
|
||||
|
Reference in New Issue
Block a user