Browse Source

Fix: desc was missing for input checkbox fields.

John Livingston 11 tháng trước cách đây
mục cha
commit
8b5b8e6ef3
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      src/templates/form_checkbox.js

+ 4 - 1
src/templates/form_checkbox.js

@@ -8,5 +8,8 @@ export default  (o) => html`
                ?readonly=${o.readonly}
                ?checked=${o.checked}
                ?required=${o.required} />
-        <label class="form-check-label" for="${o.id}">${o.label}</label>
+        <label class="form-check-label" for="${o.id}">
+            ${o.label}
+            ${(o.desc) ? html`<small class="form-text text-muted">${o.desc}</small>` : ''}
+        </label>
     </fieldset>`;