about summary refs log tree commit diff
path: root/corp/rih/src/home.html
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2023-06-02T09·48+0300
committertazjin <tazjin@tvl.su>2023-06-06T11·43+0000
commit6f0ddbac06a9a72908b8b0b955cd743d3ae82378 (patch)
tree9092b069b2c07ff037e3dc3d839b2e50d2b81fe1 /corp/rih/src/home.html
parentb2ff63586acbdcd8e1c8159cac2c09724306eda6 (diff)
feat(corp/rih): display & load captcha element inside the form r/6233
Change-Id: Ifd0f85d9e4f785c4cb1ae56ae67e6d999ff43c85
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8694
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'corp/rih/src/home.html')
-rw-r--r--corp/rih/src/home.html14
1 files changed, 14 insertions, 0 deletions
diff --git a/corp/rih/src/home.html b/corp/rih/src/home.html
index 7f26144979..95a77877d3 100644
--- a/corp/rih/src/home.html
+++ b/corp/rih/src/home.html
@@ -1,5 +1,17 @@
 html! {
 <main>
+  <script>
+    {r#"function captchaOnload(sitekey) {
+      if (window.smartCaptcha) {
+        const container = document.getElementById('captcha-container');
+        const widgetId = window.smartCaptcha.render(container, {
+            sitekey: sitekey,
+            hl: 'en',
+        });
+      }
+    }"#}
+  </script>
+
   <div class="container px-4 pt-5 my-5 text-center">
     <div class="row">
       <div class="col-7 ms-auto">
@@ -156,6 +168,8 @@ html! {
             <div id="personalDetailsHelp" class="form-text">{"Any specific places where you'd like to live? Would you be moving with family? Any other assistance required?"}</div>
           </div>
 
+          <div id="captcha-container" class="smart-captcha mb-3" style="height: 100px" />
+
           <button type="submit" class="btn btn-primary" disabled=true>{"Submit"}</button>
           <p class="pt-2"><i>{"This page is still under construction! Please reach out at contact@ if you have any questions."}</i></p>
         </form>