aboutsummaryrefslogtreecommitdiffstats
path: root/client/templates
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2022-05-18 18:39:23 +0200
committerAndrea Lepori <alepori@student.ethz.ch>2022-05-18 18:39:23 +0200
commita46d5adcc9a1e2482a093c81a7c698dbd5d46791 (patch)
treef0c41e441f3e88b428294cd74cf4b04bd0f1e63c /client/templates
parentimprove modal size on phone screens (diff)
downloadscout-subs-a46d5adcc9a1e2482a093c81a7c698dbd5d46791.tar.gz
scout-subs-a46d5adcc9a1e2482a093c81a7c698dbd5d46791.zip
add support for heading in custom params
Diffstat (limited to '')
-rw-r--r--client/templates/client/doc_create.html10
-rw-r--r--client/templates/client/doc_edit.html10
2 files changed, 18 insertions, 2 deletions
diff --git a/client/templates/client/doc_create.html b/client/templates/client/doc_create.html
index 71bdbbe..c42fa05 100644
--- a/client/templates/client/doc_create.html
+++ b/client/templates/client/doc_create.html
@@ -109,7 +109,13 @@
{% endif %}
{% if custom_data %}
{% for key in keys %}
- {% if key.key_extra|first in '!' %}
+ {% if key.key_extra|is_heading %}
+ <div class="row">
+ <div class="input-field col s12">
+ <h6>{{key.key_extra|parse_heading}}</h6>
+ </div>
+ </div>
+ {% elif key.key_extra|is_multiple_choice %}
<div class="row">
<div class="col s12">
{% with arr=key.key_extra|parse_multiple_choice %}
@@ -123,6 +129,8 @@
{% endwith %}
</div>
</div>
+ {% elif key.key_extra|is_checkbox %}
+ checkbox
{% else %}
<div class="row">
<div class="input-field col s12">
diff --git a/client/templates/client/doc_edit.html b/client/templates/client/doc_edit.html
index 40deb26..2cf3e24 100644
--- a/client/templates/client/doc_edit.html
+++ b/client/templates/client/doc_edit.html
@@ -65,7 +65,13 @@
{% endif %}
{% if custom_data %}
{% for key in keys %}
- {% if key.key_extra|first in '!' %}
+ {% if key.key_extra|is_heading %}
+ <div class="row">
+ <div class="input-field col s12">
+ <h6>{{key.key_extra|parse_heading}}</h6>
+ </div>
+ </div>
+ {% elif key.key_extra|is_multiple_choice %}
<div class="row">
<div class="col s12">
{% with arr=key.key_extra|parse_multiple_choice %}
@@ -86,6 +92,8 @@
{% endwith %}
</div>
</div>
+ {% elif key.key_extra|is_checkbox %}
+ checkbox
{% else %}
<div class="row">
<div class="input-field col s12">