File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed
com.woltlab.wcf/templates Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change 11{ capture assign= ' headContent' }
22 { if PAID_SUBSCRIPTION_ENABLE_TOS_CONFIRMATION}
33 <script data-relocate =" true" >
4- $ ( function () {
5- $( ' #tosConfirmed ' ).change(function () {
6- if ($( ' #tosConfirmed ' ).is( ' :checked ' ) ) {
7- $( ' .paidSubscriptionList button ' ).enable();
8- }
9- else {
10- $( ' .paidSubscriptionList button ' ).disable( );
11- }
12- } );
13- $( ' #tosConfirmed ' ).change ();
14- } );
4+ const tosCheckbox = document . getElementById ( ' tosConfirmed ' );
5+ const buttons = document . querySelectorAll ( ' .paidSubscriptionList button ' );
6+ if (tosCheckbox ) {
7+ function toggleButtons() {
8+ buttons.forEach(function(button) {
9+ button.disabled = ! tosCheckbox.checked;
10+ } );
11+ }
12+ tosCheckbox.addEventListener( ' change ' , toggleButtons );
13+ toggleButtons ();
14+ }
1515 </script >
1616
1717 <noscript >
You can’t perform that action at this time.
0 commit comments