Skip to content
This repository was archived by the owner on Jun 25, 2024. It is now read-only.

Commit 45532cd

Browse files
committed
Get function out of if block so it is always available
1 parent 1ea9b38 commit 45532cd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

themes/material/core/loginuserpass.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212

1313
<?php include __DIR__ . '/../common-head-elements.php' ?>
1414

15+
<script>
16+
function preventDefault(event) {
17+
event.preventDefault();
18+
}
19+
</script>
20+
1521
<?php
1622
$siteKey = htmlentities($this->data['recaptcha.siteKey'] ?? null);
1723

@@ -33,10 +39,6 @@ function onRecaptchaLoad() {
3339
});
3440
}
3541

36-
function preventDefault(event) {
37-
event.preventDefault();
38-
}
39-
4042
ga('send', 'event', 'reCAPTCHA', 'required');
4143
</script>
4244
<?php

0 commit comments

Comments
 (0)