15 lines
421 B
JavaScript
15 lines
421 B
JavaScript
/**
|
|
* public/js/patient-select.js
|
|
*
|
|
* Ersetzt den inline onchange="this.form.submit()" Handler
|
|
* an den Patienten-Radiobuttons (CSP-sicher).
|
|
*/
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
document.querySelectorAll('.patient-radio').forEach(function (radio) {
|
|
radio.addEventListener('change', function () {
|
|
var form = this.closest('form');
|
|
if (form) form.submit();
|
|
});
|
|
});
|
|
});
|