feat: add toasts and reactive feedback to forms on submission
Users were not able to tell that they had submitted before this.
This commit is contained in:
1 parent
def5c8696b
commit
07fae5878f
10 files changed
+92
-10
No files matched your search
@@ -4,7 +4,7 @@ use crate::pages::student::form_setup::use_student_form;
|
||||
|
||||
#[component]
|
||||
pub fn StudentUniversityPage() -> impl IntoView {
|
||||
let controller = use_student_form("university");
|
||||
let controller = use_student_form("university", true);
|
||||
|
||||
// college name, state, city, zip
|
||||
// major, study field, intended career, college_acceptance
|
||||
@@ -17,10 +17,12 @@ pub fn StudentUniversityPage() -> impl IntoView {
|
||||
title="University Information"
|
||||
description="Here you may fill out general information about the university you plan to attend."
|
||||
on_submit=controller.submit_action
|
||||
disabled=controller.submit_pending
|
||||
>
|
||||
// Inputs here.
|
||||
<OutlinedTextField
|
||||
label="University Name:"
|
||||
disabled=controller.submit_pending
|
||||
data_map=controller.data_map
|
||||
data_member="college_name"
|
||||
placeholder="University of Example"
|
||||
@@ -29,6 +31,7 @@ pub fn StudentUniversityPage() -> impl IntoView {
|
||||
/>
|
||||
<OutlinedTextField
|
||||
label="University Street Address:"
|
||||
disabled=controller.submit_pending
|
||||
data_map=controller.data_map
|
||||
data_member="college_city"
|
||||
placeholder="123 Example Rd"
|
||||
@@ -37,6 +40,7 @@ pub fn StudentUniversityPage() -> impl IntoView {
|
||||
/>
|
||||
<OutlinedTextField
|
||||
label="University State:"
|
||||
disabled=controller.submit_pending
|
||||
data_map=controller.data_map
|
||||
data_member="college_state"
|
||||
placeholder="CT, AZ, etc."
|
||||
@@ -45,6 +49,7 @@ pub fn StudentUniversityPage() -> impl IntoView {
|
||||
/>
|
||||
<OutlinedTextField
|
||||
label="University ZIP:"
|
||||
disabled=controller.submit_pending
|
||||
data_map=controller.data_map
|
||||
data_member="college_zip"
|
||||
placeholder="12345"
|
||||
@@ -53,6 +58,7 @@ pub fn StudentUniversityPage() -> impl IntoView {
|
||||
/>
|
||||
<Select
|
||||
label="Have you been sent an acceptance to the university?"
|
||||
disabled=controller.submit_pending
|
||||
data_map=controller.data_map
|
||||
data_member="college_acceptance"
|
||||
required=true
|
||||
@@ -60,6 +66,7 @@ pub fn StudentUniversityPage() -> impl IntoView {
|
||||
/>
|
||||
<Select
|
||||
label="Intended Major/Field of Study:"
|
||||
disabled=controller.submit_pending
|
||||
data_map=controller.data_map
|
||||
data_member="major"
|
||||
required=true
|
||||
@@ -95,6 +102,7 @@ pub fn StudentUniversityPage() -> impl IntoView {
|
||||
/>
|
||||
<OutlinedTextField
|
||||
label="Intended Career:"
|
||||
disabled=controller.submit_pending
|
||||
data_map=controller.data_map
|
||||
data_member="intended_career"
|
||||
placeholder="Engineer, Artist, etc."
|
||||
|
||||
Reference in new issue
Block a user