From 20a671036586088578952f4958440f246decb06e Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 2 Jun 2023 17:03:31 +0300 Subject: feat(corp/rih): activate submit button when data is complete The completion detection is very naive for now, but baby steps etc. Change-Id: Iec6eae77fca13f3fc0ee1225268eef04277b504a Reviewed-on: https://cl.tvl.fyi/c/depot/+/8702 Tested-by: BuildkiteCI Reviewed-by: tazjin --- corp/rih/src/home.html | 5 ++++- corp/rih/src/main.rs | 10 ++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/corp/rih/src/home.html b/corp/rih/src/home.html index 7f1ff5f332a2..df77ee1e8820 100644 --- a/corp/rih/src/home.html +++ b/corp/rih/src/home.html @@ -171,7 +171,10 @@ html! {
- +

{"This page is still under construction! Please reach out at contact@ if you have any questions."}

diff --git a/corp/rih/src/main.rs b/corp/rih/src/main.rs index a419e2d9bfc8..02cb350d1acb 100644 --- a/corp/rih/src/main.rs +++ b/corp/rih/src/main.rs @@ -98,6 +98,16 @@ struct Record { work_background: String, } +impl Record { + fn is_complete(&self) -> bool { + !self.name.is_empty() + && !self.email.is_empty() + && !self.citizenship.is_empty() + && !self.position.is_empty() + && !self.technologies.is_empty() + } +} + struct App { // The record being populated. record: Record, -- cgit 1.4.1