aboutsummaryrefslogtreecommitdiffstats
path: root/client/templates
diff options
context:
space:
mode:
Diffstat (limited to 'client/templates')
-rw-r--r--client/templates/client/doc_create.html28
-rw-r--r--client/templates/client/doc_edit.html35
2 files changed, 53 insertions, 10 deletions
diff --git a/client/templates/client/doc_create.html b/client/templates/client/doc_create.html
index 2f70ef3..ce5f39d 100644
--- a/client/templates/client/doc_create.html
+++ b/client/templates/client/doc_create.html
@@ -6,6 +6,8 @@
<a href="#!" class="breadcrumb hide-on-med-and-down">Crea Iscrizione</a>
{% endblock %}
+{% load app_filter %}
+
{% block content %}
<div class="row">
<div class="col l8 offset-l2 s12">
@@ -107,12 +109,28 @@
{% endif %}
{% if custom_data %}
{% for key in keys %}
- <div class="row">
- <div class="input-field col s12">
- <input value="" name="{{key.id}}" id="{{key.id}}" type="text">
- <label for="{{key.id}}">{{key.key}}</label>
+ {% if key.key_extra|first in '!' %}
+ <div class="row">
+ <div class="col s12">
+ {% with arr=key.key_extra|parse_multiple_choice %}
+ {{arr.0}}
+ {% for val in arr.1 %}
+ <p><label>
+ <input class="with-gap" name="{{key.id}}" value="{{val}}" type="radio"/>
+ <span>{{val}}</span>
+ </label></p>
+ {% endfor %}
+ {% endwith %}
+ </div>
</div>
- </div>
+ {% else %}
+ <div class="row">
+ <div class="input-field col s12">
+ <input value="" name="{{key.id}}" id="{{key.id}}" type="text">
+ <label for="{{key.id}}">{{key.key}}</label>
+ </div>
+ </div>
+ {% endif %}
{% endfor %}
{% endif %}
<div class="row">
diff --git a/client/templates/client/doc_edit.html b/client/templates/client/doc_edit.html
index a622ea8..a9cc056 100644
--- a/client/templates/client/doc_edit.html
+++ b/client/templates/client/doc_edit.html
@@ -6,6 +6,8 @@
<a href="#!" class="breadcrumb hide-on-med-and-down">Modifica iscrizione</a>
{% endblock %}
+{% load app_filter %}
+
{% block content %}
<div class="row">
<div class="col l8 offset-l2 s12">
@@ -63,12 +65,35 @@
{% endif %}
{% if custom_data %}
{% for key in keys %}
- <div class="row">
- <div class="input-field col s12">
- <input value="{{key.value}}" name="{{key.id}}" id="{{key.id}}" type="text">
- <label for="{{key.id}}">{{key.key}}</label>
+ {% if key.key_extra|first in '!' %}
+ <div class="row">
+ <div class="col s12">
+ {% with arr=key.key_extra|parse_multiple_choice %}
+ {{arr.0}}
+ {% for val in arr.1 %}
+ {% if key.value == val %}
+ <p><label>
+ <input class="with-gap" name="{{key.key}}" value="{{val}}" type="radio" checked/>
+ <span>{{val}}</span>
+ </label></p>
+ {% else %}
+ <p><label>
+ <input class="with-gap" name="{{key.key}}" value="{{val}}" type="radio"/>
+ <span>{{val}}</span>
+ </label></p>
+ {% endif %}
+ {% endfor %}
+ {% endwith %}
+ </div>
</div>
- </div>
+ {% else %}
+ <div class="row">
+ <div class="input-field col s12">
+ <input value="{{key.value}}" name="{{key.key}}" id="{{key.id}}" type="text">
+ <label for="{{key.id}}">{{key.key}}</label>
+ </div>
+ </div>
+ {% endif %}
{% endfor %}
{% endif %}
<div class="row">