Projet

Général

Profil

0001-js-update-prefill-value-for-checkbox-fields-57860.patch

Lauréline Guérin, 14 octobre 2021 16:40

Télécharger (1,12 ko)

Voir les différences:

Subject: [PATCH] js: update prefill value for checkbox fields (#57860)

 wcs/qommon/static/js/qommon.forms.js | 3 +++
 1 file changed, 3 insertions(+)
wcs/qommon/static/js/qommon.forms.js
480 480
                // replace text input value
481 481
                if ($(widget).is('.widget-prefilled') || $(widget).is('.widget-readonly') || data.modified_field == 'user') {
482 482
                  $(widget).find('input[type=text], input[type=tel], input[type=numeric], input[type=email], textarea').val(value.content);
483
                  if ($(widget).find('input[type=checkbox]')) {
484
                    $(widget).find('input[type=checkbox]').prop('checked', value.content == 'True');
485
                  }
483 486
                }
484 487
              }
485 488
            });
486
-