mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Merge branch 'development' of gitlab.ub.uni-bielefeld.de:sfb1288inf/opaque into development
This commit is contained in:
commit
80c049ae06
@ -8,7 +8,7 @@ ENV FLASK_APP=nopaque.py
|
|||||||
ENV LANG=C.UTF-8
|
ENV LANG=C.UTF-8
|
||||||
|
|
||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 5000
|
||||||
|
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
@ -34,9 +34,6 @@ RUN python -m venv venv \
|
|||||||
&& mkdir logs
|
&& mkdir logs
|
||||||
|
|
||||||
|
|
||||||
VOLUME ["/home/nopaque/logs", "/home/nopaque/migrations"]
|
|
||||||
|
|
||||||
|
|
||||||
COPY ["docker-entrypoint.sh", "/usr/local/bin/"]
|
COPY ["docker-entrypoint.sh", "/usr/local/bin/"]
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,17 +1,33 @@
|
|||||||
{% macro render_field(field) %}
|
{% macro render_field(field) %}
|
||||||
|
{% if field.flags.required %}
|
||||||
|
{% if 'class_' in kwargs and 'validate' not in kwargs['class_'] %}
|
||||||
|
{% set tmp = kwargs.update({'class_': kwargs['class_'] + ' validate'}) %}
|
||||||
|
{% else %}
|
||||||
|
{% set tmp = kwargs.update({'class_': 'validate'}) %}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if field.type == 'BooleanField' %}
|
{% if field.type == 'BooleanField' %}
|
||||||
{{ render_boolean_field(field, *args, **kwargs) }}
|
{{ render_boolean_field(field, *args, **kwargs) }}
|
||||||
|
{% elif field.type == 'IntegerField' %}
|
||||||
|
{% set tmp = kwargs.update({'type': 'number'}) %}
|
||||||
|
{% if 'class_' in kwargs and 'validate' not in kwargs['class_'] %}
|
||||||
|
{% set tmp = kwargs.update({'class_': kwargs['class_'] + ' validate'}) %}
|
||||||
|
{% else %}
|
||||||
|
{% set tmp = kwargs.update({'class_': 'validate'}) %}
|
||||||
|
{% endif %}
|
||||||
|
{{ render_generic_field(field, *args, **kwargs) }}
|
||||||
{% elif field.type == 'SubmitField' %}
|
{% elif field.type == 'SubmitField' %}
|
||||||
{{ render_submit_field(field, *args, **kwargs) }}
|
{{ render_submit_field(field, *args, **kwargs) }}
|
||||||
{% elif field.type in ['FileField', 'MultipleFileField'] %}
|
{% elif field.type in ['FileField', 'MultipleFileField'] %}
|
||||||
{{ render_file_field(field, *args, **kwargs) }}
|
{{ render_file_field(field, *args, **kwargs) }}
|
||||||
{% elif field.type in ['IntegerField', 'PasswordField', 'SelectField', 'StringField'] %}
|
{% elif field.type in ['PasswordField', 'SelectField', 'StringField'] %}
|
||||||
{{ render_generic_field(field, *args, **kwargs) }}
|
{{ render_generic_field(field, *args, **kwargs) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro render_boolean_field(field) %}
|
{% macro render_boolean_field(field) %}
|
||||||
<div class="switch">
|
<div class="switch">
|
||||||
{% if 'material_icon' in kwargs %}
|
{% if 'material_icon' in kwargs %}
|
||||||
<i class="material-icons prefix">{{ kwargs.pop('material_icon') }}</i>
|
<i class="material-icons prefix">{{ kwargs.pop('material_icon') }}</i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -23,11 +39,11 @@
|
|||||||
{% for error in field.errors %}
|
{% for error in field.errors %}
|
||||||
<span class="helper-text red-text">{{ error }}</span>
|
<span class="helper-text red-text">{{ error }}</span>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro render_file_field(field) %}
|
{% macro render_file_field(field) %}
|
||||||
<div class="file-field input-field">
|
<div class="file-field input-field">
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
<span>{{ field.label.text }}</span>
|
<span>{{ field.label.text }}</span>
|
||||||
{{ field(**kwargs) }}
|
{{ field(**kwargs) }}
|
||||||
@ -35,18 +51,10 @@
|
|||||||
<div class="file-path-wrapper">
|
<div class="file-path-wrapper">
|
||||||
<input class="file-path validate" type="text">
|
<input class="file-path validate" type="text">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro render_generic_field(field) %}
|
{% macro render_generic_field(field) %}
|
||||||
{% if field.type == 'IntegerField' %}
|
|
||||||
{% set tmp = kwargs.update({'type': 'number'}) %}
|
|
||||||
{% if 'class_' in kwargs and 'validate' not in kwargs['class_'] %}
|
|
||||||
{% set tmp = kwargs.update({'class_': kwargs['class_'] + ' validate'}) %}
|
|
||||||
{% else %}
|
|
||||||
{% set tmp = kwargs.update({'class_': 'validate'}) %}
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
{% if 'material_icon' in kwargs %}
|
{% if 'material_icon' in kwargs %}
|
||||||
<i class="material-icons prefix">{{ kwargs.pop('material_icon') }}</i>
|
<i class="material-icons prefix">{{ kwargs.pop('material_icon') }}</i>
|
||||||
@ -60,10 +68,10 @@
|
|||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro render_submit_field(field) %}
|
{% macro render_submit_field(field) %}
|
||||||
<button class="btn waves-effect waves-light" id="{{ field.id }}" name="{{ field.name }}" type="submit" value="{{ field.label.text }}">
|
<button class="btn waves-effect waves-light" id="{{ field.id }}" name="{{ field.name }}" type="submit" value="{{ field.label.text }}">
|
||||||
{{ field.label.text }}
|
{{ field.label.text }}
|
||||||
{% if 'material_icon' in kwargs %}
|
{% if 'material_icon' in kwargs %}
|
||||||
<i class="material-icons right">{{ kwargs.pop('material_icon') }}</i>
|
<i class="material-icons right">{{ kwargs.pop('material_icon') }}</i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</button>
|
</button>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
Loading…
Reference in New Issue
Block a user