From 572b21015a50118c61b8c2af8b8f577235fca919 Mon Sep 17 00:00:00 2001
From: Cayla Horsey <cayla.horsey@powerhrg.com>
Date: Wed, 7 Aug 2024 14:21:53 -0400
Subject: [PATCH] Complete all tests

---
 app.rb            | 13 +++++++++++++
 views/newteam.erb | 36 +++++++++++++++++++++++++++++-------
 views/team.erb    | 22 +++++++++++++++++-----
 3 files changed, 59 insertions(+), 12 deletions(-)

diff --git a/app.rb b/app.rb
index 2bd6170..39f7f37 100644
--- a/app.rb
+++ b/app.rb
@@ -2,5 +2,18 @@
 
 class App < Sinatra::Base
 
+  get '/newteam' do
+    erb :newteam
+  end
 
+  post '/team' do
+    @team_name = params[:name]
+    @coach = params[:coach]
+    @pg = params[:pg]
+    @sg = params[:sg]
+    @sf = params[:sf]
+    @pf = params[:pf]
+    @c = params[:c]
+    erb :team
+  end
 end
diff --git a/views/newteam.erb b/views/newteam.erb
index 2eb4207..1297e32 100644
--- a/views/newteam.erb
+++ b/views/newteam.erb
@@ -1,11 +1,33 @@
 <!DOCTYPE html>
 <html>
- <head>
+<head>
   <meta charset="UTF-8">
   <title>Basketball Team Signup</title>
- </head>
- <body>
- </body>
-</html>
-
-
+</head>
+<body>
+  <form action="/team" method="POST">
+    <br>
+    <label for="name">Team Name:</label>
+    <input type="text" id="name" name="name" /><br>
+    <br>
+    <label for="coach">Coach:</label>
+    <input type="text" id="coach" name="coach"/><br>
+    <br>
+    <label for="pg">Point Guard:</label>
+    <input type="text" id="pg" name="pg" /><br>
+    <br>
+    <label for="sg">Shooting Guard:</label>
+    <input type="text" id="sg" name="sg"><br>
+    <br>
+    <label for="sf">Small Forward:</label>
+    <input type="text" id="sf" name="sf" /><br>
+    <br>
+    <label for="pf">Power Forward:</label>
+    <input type="text" id="pf" name="pf"/><br>
+    <br>
+    <label for="c">Center:</label>
+    <input type="text" id="c" name="c"/><br>
+    <br>
+    <input id="submit" type="submit" value="Submit">
+  </form>
+</body>
diff --git a/views/team.erb b/views/team.erb
index 1402747..29d6956 100644
--- a/views/team.erb
+++ b/views/team.erb
@@ -5,10 +5,22 @@
   <title>Basketball Team</title>
  </head>
  <body>
- 
+<body>
 
-
- </body>
+<!DOCTYPE html>
+<html>
+<head>
+  <meta charset="UTF-8">
+  <title>Basketball Team</title>
+</head>
+<body>
+  <h1>Team Information</h1>
+  <p><strong>Team Name:</strong> <%= @team_name %></p>
+  <p><strong>Coach:</strong> <%= @coach %></p>
+  <p><strong>Point Guard:</strong> <%= @pg %></p>
+  <p><strong>Shooting Guard:</strong> <%= @sg %></p>
+  <p><strong>Small Forward:</strong> <%= @sf %></p>
+  <p><strong>Power Forward:</strong> <%= @pf %></p>
+  <p><strong>Center:</strong> <%= @c %></p>
+</body>
 </html>
-
-