customer-extras overviews

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-02-25 17:17:29 +01:00
parent 01798650fe
commit 8c6452bb05
11 changed files with 211 additions and 88 deletions

View File

@@ -6,7 +6,7 @@
{% if field.desc is defined and field.desc is not empty %}<br><small>{{ field.desc|raw }}</small>
{% endif %}
</label>
<div class="col-sm-8">
<div class="col-sm-8{% if field.type == 'infotext' %} d-flex align-items-center{% endif %}">
{% endif %}
{% if field.type == 'text' or field.type == 'password' or field.type == 'number' or field.type == 'file' or field.type == 'email' or field.type == 'hidden' %}
{{ _self.input(id, field) }}
@@ -24,6 +24,8 @@
{{ _self.link(id, field) }}
{% elseif field.type == 'itemlist' %}
{{ _self.itemlist(id, field) }}
{% elseif field.type == 'infotext' %}
{{ _self.infotext(id, field) }}
{% endif %}
{% if norow == false and field.type != 'hidden' %}
</div>
@@ -49,6 +51,22 @@
{% endif %}
{% endmacro %}
{% macro infotext(id, field) %}
{% if field.next_to is defined %}
<div class="input-group">
{% endif %}
<span {% if field.classes is defined %} class="{{ field.classes }}" {% endif %}>{{ field.value }}</span>
{% if field.next_to is defined %}
{% for nid, nfield in field.next_to %}
{% if nfield.next_to_prefix is defined %}
<span class="input-group-text">{{ nfield.next_to_prefix }}</span>
{% endif %}
{{ _self.fieldrow(nid, nfield, true) }}
{% endfor %}
</div>
{% endif %}
{% endmacro %}
{% macro plain(id, field) %}
{% if field.next_to is defined %}
<div class="input-group">
@@ -74,7 +92,7 @@
<input type="text" readonly class="form-control-plaintext" value="{{ field.display }}">
{% endif %}
{% if field.note is defined and field.note is not empty %}
<div class="invalid-feedback">{{ field.note|raw }}</div>
<div class="invalid-feedback">{{ field.note|raw }}</div>
{% endif %}
{% if field.next_to is defined %}
{% for nid, nfield in field.next_to %}