Skip to content

Commit

Permalink
newport
Browse files Browse the repository at this point in the history
  • Loading branch information
mariamotorina committed Feb 6, 2024
1 parent f7c5ef4 commit c02c1da
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion themes/nhs/views/Contact/form_html.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,26 @@
</div>
</div><!-- end col -->
</div><!-- end row -->
<?php
if(!$this->request->isLoggedIn() && defined("__CA_GOOGLE_RECAPTCHA_KEY__") && __CA_GOOGLE_RECAPTCHA_KEY__){
?>
<script type="text/javascript">
var gCaptchaRender = function(){
grecaptcha.render('regCaptcha', {'sitekey': '<?= __CA_GOOGLE_RECAPTCHA_KEY__; ?>'});
};
</script>
<script src='https://www.google.com/recaptcha/api.js?onload=gCaptchaRender&render=explicit' async defer></script>
<div class="row">
<div class="col-sm-12">
<div class='form-group<?= (($va_errors["recaptcha"]) ? " has-error" : ""); ?>'>
<div id="regCaptcha"></div>
</div>
</div>
</div><!-- end row -->
<?php
}else{
?>

<div class="row">
<div class="col-sm-4">
<div class="form-group<?php print (($va_errors["security"]) ? " has-error" : ""); ?>">
Expand All @@ -109,7 +129,9 @@
</div>
</div><!-- end col -->
</div><!-- end row -->

<?php
}
?>
<div class="form-group">
<br/><button type="submit" class="btn btn-default">Send</button>
</div><!-- end form-group -->
Expand Down

0 comments on commit c02c1da

Please sign in to comment.