4 Commits
Author SHA1 Message Date
auto 821e63953b Refactor email verification UI to enhance data display
Replaced table with div and paragraph elements to improve readability of user-submitted data. Added logic to handle multiline form data and remove empty lines, ensuring cleaner and more user-friendly presentation.
2024-08-11 18:47:19 +02:00
auto ceaca60ece Add additional_info field to form requirements
Include extra guidance for the user to specify their timezone. This aims to reduce ambiguity and ensure better form submissions. The change is minimal but improves overall user experience.
2024-08-11 18:41:56 +02:00
auto b00b857f29 Add "Apply for staff" link to homepage
This commit enhances the homepage by adding a new link to the "Apply for staff" page, making it easier for visitors to find and access staff application information directly from the main page. The new link is placed alongside the existing "Contact us" link for better visibility.
2024-08-11 18:32:57 +02:00
auto cf7bdeb481 Enforce integer validation on age and average time fields
Added integer validation messages to the age and avg_time fields to ensure users enter whole numbers. This enhances the form's data integrity by preventing input errors.
2024-08-10 04:35:54 +02:00
3 changed files with 18 additions and 12 deletions
+3
View File
@@ -89,6 +89,7 @@ export const apply: FormData = {
min_length: 3,
max_length: 256,
required: true,
additional_info: "Please include your timezone."
},
{
label: "Do you have any previous experience being staff?",
@@ -163,6 +164,7 @@ export const apply: FormData = {
age: Yup.number()
.typeError('Input must be a number')
.integer('Please enter a whole number')
.min(0, 'Please enter a valid age')
.max(999, 'We do not accept players older than 999 years old sorry!')
.required('You are required to fill out your age'),
@@ -175,6 +177,7 @@ export const apply: FormData = {
avg_time: Yup.number()
.typeError('Please enter a number')
.integer('Please enter a whole number')
.min(0, 'Please enter a positive number')
.max(168, 'There are only 168 hours in a week')
.required('Please enter the average time you will be available each week'),
+1
View File
@@ -11,6 +11,7 @@ const Home: FunctionComponent = () => {
<header className="App-header">
<h1>Welcome to the Altitude forms page</h1>
<h2><a href="/contact">Contact us.</a></h2>
<h2><a href="/apply">Apply for staff.</a></h2>
</header>
</div>
);
+12 -10
View File
@@ -26,19 +26,21 @@ const ThankYou: FC = () => {
</Helmet>
<header className="header">Thank you for completing the form and verifying your email!<br></br>This is the data you entered:</header>
<div className="fields">
<table>
<tbody>
{Object.entries(formData).map(([key, value]) => (
<tr className="form-data-row" id={key}>
<td className="form-data-key">{key}</td>
<td className="form-data-value">{value}</td>
</tr>
<div>
<p><strong>{key}</strong></p>
{
value
.split("\n")
.filter(str => str.trim() !== "")
.map((str, index) => <p style={{ wordWrap: 'break-word' }}>{str}</p>)
}
</div>
))}
</tbody>
</table>
</div>
</div>
);
</div>
)
;
}