Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Done #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Done.
GregBenn committed Jul 6, 2018
commit 58b0b1aaed32447ad058e133622ae42ca90e0aa1
7 changes: 6 additions & 1 deletion app.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
require 'sinatra/base'

class App < Sinatra::Base
get '/newteam' do
erb :newteam
end


post '/team' do
erb :team
end
end
38 changes: 32 additions & 6 deletions views/newteam.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,37 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Basketball Team Signup</title>
</head>
<body>
</body>
<head>
<meta charset="UTF-8">
<title>Basketball Team Signup</title>
</head>

<body>
<h1>Create a Basketball Team!</h1>
<form method="POST" action="/team">
<label for="POST_team_name">Team Name:</label>
<input id="POST_team_name" type="text" name="name">
<br>
<label for="POST_coach">Coach:</label>
<input id="POST_coach" type="text" name="coach">
<br>
<label for="POST_point_guard">Point Guard:</label>
<input id="POST_point_guard" type="text" name="pg">
<br>
<label for="POST_shooting_guard">Shooting Guard:</label>
<input id="POST_shooting_guard" type="text" name="sg">
<br>
<label for="POST_small_forward">Small Forward:</label>
<input id="POST_small_forward" type="text" name="sf">
<br>
<label for="POST_power_forward">Power Forward:</label>
<input id="POST_power_forward" type="text" name="pf">
<br>
<label for="POST_center">Center:</label>
<input id="POST_center" type="text" name="c">
<br>
<button id="submit" type="submit" value="POST_submit">Submit</button>
</form>
</body>
</html>


21 changes: 13 additions & 8 deletions views/team.erb
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Basketball Team</title>
</head>
<body>

<head>
<meta charset="UTF-8">
<title>Basketball Team</title>
</head>
<body>
<h1>Team Name: <%= params[:name] %></h1>
<h2>Coach: <%= params[:coach] %></h2>
<h2>Point Guard: <%= params[:pg] %></h2>
<h2>Shooting Guard: <%= params[:sg] %></h2>
<h2>Small Forward: <%= params[:sf] %></h2>
<h2>Power Forward: <%= params[:pf] %></h2>
<h2>Center: <%= params[:c] %></h2>


</body>
</body>
</html>