minor adjustments for darkmode and formfields mandatory-flag for checkboxes
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -85,7 +85,7 @@
|
||||
{% if field.is_array is defined and field.is_array == 1 and field.values is not empty %}
|
||||
{% for subfield in field.values %}
|
||||
<div class="form-check form-switch">
|
||||
<input type="checkbox" {% if (field.visible is defined and field.visible == false) or (field.disabled is defined and field.disabled == true) %} disabled {% endif %} value="{{ subfield.value }}" name="{{ id }}[]" class="form-check-input" {% if field.value is defined and subfield.value in field.value %} checked="checked" {% endif %}>
|
||||
<input type="checkbox" {% if (field.visible is defined and field.visible == false) or (field.disabled is defined and field.disabled == true) %} disabled {% endif %} value="{{ subfield.value }}" name="{{ id }}[]" class="form-check-input" {% if field.value is defined and subfield.value in field.value %} checked="checked" {% endif %}{% if field.mandatory is defined and field.mandatory %} required {% endif %}>
|
||||
<label class="form-check-label">
|
||||
{{ subfield.label|raw }}
|
||||
</label>
|
||||
@@ -94,7 +94,7 @@
|
||||
{% else %}
|
||||
<div class="form-check form-switch">
|
||||
<input type="hidden" value="0" name="{{ id }}" />
|
||||
<input type="checkbox" {% if (field.visible is defined and field.visible == false) or (field.disabled is defined and field.disabled == true) %} disabled {% endif %} value="{{ field.value }}" id="{{ id }}" name="{{ id }}" class="form-check-input {% if field.valid is defined and field.valid == false %}is-invalid{% endif %}" {% if field.checked is defined and field.checked == 1 %} checked="checked" {% endif %}>
|
||||
<input type="checkbox" {% if (field.visible is defined and field.visible == false) or (field.disabled is defined and field.disabled == true) %} disabled {% endif %} value="{{ field.value }}" id="{{ id }}" name="{{ id }}" class="form-check-input {% if field.valid is defined and field.valid == false %}is-invalid{% endif %}" {% if field.checked is defined and field.checked == 1 %} checked="checked" {% endif %}{% if field.mandatory is defined and field.mandatory %} required {% endif %}>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
@@ -43,7 +43,9 @@ section h5 {
|
||||
.form-control:focus {
|
||||
color: $dark-bg;
|
||||
}
|
||||
|
||||
.form-control[readonly]:focus {
|
||||
color: $white;
|
||||
}
|
||||
.form-control-plaintext {
|
||||
color: $white;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user