]> saetta.ns0.it Git - rust/zakform/commitdiff
Right css class for radio label. validators
authorAndrea Zagli <azagli@libero.it>
Tue, 5 May 2026 08:01:23 +0000 (10:01 +0200)
committerAndrea Zagli <azagli@libero.it>
Tue, 5 May 2026 08:01:23 +0000 (10:01 +0200)
src/fields.rs

index 1bb1c426867c1a2da34d2ef61b4ce1d9636aca75..8b4a12404153aa9a510073699adb932102a72778 100644 (file)
@@ -674,7 +674,7 @@ impl FieldRadio {
  {% for o in options %}
  <div class="form-check{% if inline %} form-check-inline{% endif %}{% if help %} is-invalid{% endif %}">
  <input type="radio" class="form-check-input{% if help %} is-invalid{% endif %}{% if class %} {{ class }}{% endif %}" name="{{ name }}" id="{{ name }}_{{ loop.index }}" value="{{ o.value }}"{% if value == o.value %} checked{% endif %}/>
- <label class="form-label" for="{{ name }}_{{ loop.index }}">{{ o.label }}</label>
+ <label class="form-check-label" for="{{ name }}_{{ loop.index }}">{{ o.label }}</label>
  </div>
  {% endfor %}
  {% if help %}<div id="helpBox_{{ name }}_" class="invalid-feedback">{{ help }}</div>{% endif %}
@@ -685,7 +685,7 @@ _ => {},
 
                match f.field.tmpl.add_raw_template("field_single", r#"<div class="form-check{% if help %} is-invalid{% endif %}">
  <input type="radio" class="form-check-input{% if inline %} form-check-inline{% endif %}{% if help %} is-invalid{% endif %}{% if class %} {{ class }}{% endif %}" name="{{ name }}" id="{{ name }}_{{ idx + 1 }}" value="{{ value }}"{% if checked != "" %} checked{% endif %}/>
- <label class="form-label" for="{{ name }}_{{ idx + 1 }}">{{ label }}</label>
+ <label class="form-check-label" for="{{ name }}_{{ idx + 1 }}">{{ label }}</label>
  </div>"#) {
 Err(e) => { println!("{:?}", e) },
 _ => {},