diff options
Diffstat (limited to 'corp')
-rw-r--r-- | corp/rih/src/home.html | 5 | ||||
-rw-r--r-- | corp/rih/src/main.rs | 10 |
2 files changed, 14 insertions, 1 deletions
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! { <div id="captcha-container" class="smart-captcha mb-3" style="height: 100px" /> - <button type="submit" class="btn btn-primary" disabled=true>{"Submit"}</button> + <button type="submit" class="btn btn-primary" + disabled={!(self.record.is_complete() && self.captcha_token.is_some())}> + {"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> </div> 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, |