From c0f8d9532da8cbcb583412d01bfaa7c0787e9f12 Mon Sep 17 00:00:00 2001 From: micafer Date: Tue, 30 Mar 2021 10:31:53 +0200 Subject: [PATCH] Fix #127 and #99 in default form --- app/templates/default_form.html | 32 ++++++++++++++++++++++++++++---- app/templates/input_types.html | 1 + 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/app/templates/default_form.html b/app/templates/default_form.html index bf3345637..0d371bd78 100644 --- a/app/templates/default_form.html +++ b/app/templates/default_form.html @@ -1,7 +1,7 @@
@@ -10,6 +10,8 @@
{% if inputs|length > 0 %} {% for key, value in inputs.items() %} + {% set min_length = value.constraints | selectattr('min_length') | map(attribute='min_length') | list %} + {% set max_length = value.constraints | selectattr('max_length') | map(attribute='max_length') | list %}
@@ -22,9 +24,14 @@ {% endfor %} {% else %} + {% if value.type == "integer" %} + + + {% else %} - - {% endif %} + + {% endif %} + {% endif %}
{% endfor %} {% else %} @@ -38,3 +45,20 @@

No input value to submit.

{% include 'advanced_config.html' %}
+ + \ No newline at end of file diff --git a/app/templates/input_types.html b/app/templates/input_types.html index 9f1d6378a..81897fb61 100644 --- a/app/templates/input_types.html +++ b/app/templates/input_types.html @@ -84,6 +84,7 @@ {% else %} {% if value.type == "integer" %} + {% else %}