Permalink
Browse files

Add confirmation page

  • Loading branch information...
1 parent 905b44a commit 53665bd7d97f320484de2d7d5b39261ed543e6cd @mkelly12 mkelly12 committed Apr 1, 2012
View
4 app/controllers/brograms_controller.rb
@@ -4,4 +4,8 @@ def new
end
+ def create
+
+ end
+
end
View
46 app/views/brograms/create.html.erb
@@ -0,0 +1,46 @@
+ <div class="row">
+ <div class="twelve columns">
+
+ <% if params[:zipcode] == '95008' %>
+ <!-- Confirmed Code -->
+ <h2 class="space">Confirmed!</h2>
+ <h4>Thanks for your brogram!</h4>
+ <h5>We will attempt to deliver this since you are in the Campbell area.</h5>
+ <!-- <p>Share Your Brogram:
+ <a href="https://twitter.com/share" class="twitter-share-button">Twitter</a>
+ <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
+ <a href="facebook.com/sharer.php">Facebook</a>
+ </p> -->
+ <% else %>
+
+ <!-- Outside Campbell Code -->
+ <h2 class="space">Oh Noes!</h2>
+ <h4>We're sorry!</h4>
+ <h5>This is a pilot in the Campbell, CA area we will try to add your area someday...</h5>
+ <!-- <p>Share Your Brogram:
+ <a href="https://twitter.com/share" class="twitter-share-button">Twitter</a>
+ <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
+ <a href="facebook.com/sharer.php">Facebook</a>
+ </p> -->
+ <% end %>
+ <hr />
+ </div>
+</div>
+<div class="row">
+ <div class="six columns">
+ <h3>Sender:</h3>
+ <p class="big">Name: <%= params[:brogram][:yourname] %></p>
+ <p class="big">Email: <%= params[:brogram][:youremail] %></p>
+ </div>
+ <div class="six columns">
+ <h3>Recipient:</h3>
+ <p class="big">Name: <%= params[:brogram][:broname] %></p>
+ <p class="big">Address: <%= params[:brogram][:address] %><p>
+ <p class="big"><%= params[:brogram][:city] %>, <%= params[:brogram][:zipcode] %></p>
+ <p class="big">Type: <%= params[:brogram][:type] %></p>
+ <p>
+ <!-- Image of Type Selected -->
+ <!-- <img src="http://placehold.it/200x200"></img> -->
+ </p>
+ </div>
+</div>
View
115 app/views/brograms/new.html.erb
@@ -0,0 +1,115 @@
+<div class="row">
+ <div class="twelve columns">
+ <div class="well">
+ <p class="putcenter">Inspired by Bro Code, Brogram is a special message<br/>
+ from one bro to another, delivered by a bro.
+ </p>
+ </div>
+ </div>
+</div>
+
+<!-- Video -->
+<div class="row">
+ <div class="wrapper">
+ <div class="flex-video">
+ <iframe src="http://www.youtube.com/embed/w8rbCzhUS5Y" frameborder="0" allowfullscreen></iframe>
+ </div>
+ </div>
+</div>
+<br />
+
+<!-- Images -->
+<div class="row">
+ <div class="twelve columns">
+ <p class="options">Three browesome options to choose from:</p>
+ </div>
+</div>
+<div class="row">
+ <div class="four columns">
+ <p><%= image_tag 'brograms/hifive.png' %></p>
+ </div>
+ <div class="four columns">
+ <p><%= image_tag 'brograms/icebox.png' %></p>
+ </div>
+ <div class="four columns">
+ <p><%= image_tag 'brograms/lovebox.png' %></p>
+ </div>
+</div>
+
+<!-- Web Form -->
+
+<div class="row">
+ <div class="twelve columns">
+ <%= form_tag brograms_path, :class => 'nice custom well bottom' %>
+ <form class="nice custom well bottom" action="confirmation.html" id="sendBrogram">
+ <h3 class="send">Send a Brogram!</h3>
+ <div class="row">
+ <div class="six columns">
+ <p>
+ <label for="yourname"></label>
+ <input class="input-text expand" type="text" name="brogram[yourname]" id="yourname" placeholder="Your Name"/>
+ </p>
+ </div>
+ <div class="six columns">
+ <p class="input-text">
+ <label for="youremail"></label>
+ <input class="input-text expand" type="text" name="brogram[youremail]" id="youremail" placeholder="Your Email" />
+ </p>
+ </div>
+ </div>
+ <div class="row">
+ <p class="choice">Send my bro this brogram:</p>
+ <ul class="type-of-brogram">
+ <li class="mini-hf"><label for="five"><input type="radio" name="brogram[type]" value="High Five" CHECKED id="five" style="display: none;" /><span class="custom radio selected"></span></label></li>
+ <li class="mini-ic"><label for="ice"><input type="radio" name="brogram[type]" value="Ice" id="five" style="display: none;" /><span class="custom radio"></span></label></li>
+ <li class="mini-lb"><label for="romance"><input type="radio" name="brogram[type]" value="Love Box" id="five" style="display: none;" /><span class="custom radio"></span></label></li>
+ </ul>
+ </div>
+ <div class="row">
+ <div class="six columns">
+ <p>
+ <label for="broname"></label>
+ <input class="input-text expand" type="text" name="brogram[broname]" id="broname" placeholder="Bro's Name" />
+ </p>
+ </div>
+ <div class="six columns">
+ <p>
+ <label for="broname"></label>
+ <input class="input-text expand" type="text" name="brogram[broemail]" id="broemail" placeholder="Bro's Email" />
+ </p>
+ </div>
+ </div>
+ <div class="row">
+ <div class="six columns">
+ <p>
+ <label for="address"></label>
+ <input class="input-text expand" type="text" name="brogram[address]" id="address" placeholder="Bro's Address" />
+ </p>
+ </div>
+ <div class="four columns">
+ <label for="city"></label>
+ <input type="text" class="expand small input-text" name="brogram[city]" id="city" placeholder="City" />
+
+ </div>
+ <div class="two columns">
+ <label for="zipcode"></label>
+ <input type="text" class="expand small input-text" name="brogram[zipcode]" id="zipcode" placeholder="Zip Code" />
+ </div>
+ </div>
+ <!-- <p>
+ <label for="time">Time</label>
+ <select id="brogramTime">
+ <option>This is a dropdown</option>
+ <option>This is another option</option>
+ <option>Look, a third option</option>
+ </select>
+ </p> -->
+ <p class="submit">
+ <input type="submit" id="submitBrogram" />
+ <!--<input class="large nice radius button" type="submit" value="Submit" /> -->
+ </p>
+
+ <hr />
+ </form>
+ </div>
+</div>
View
141 app/views/layouts/application.html.erb
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<! april fools -->
+<!-- april fools -->
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
@@ -32,137 +32,24 @@
<!-- container -->
<div class="container">
-
+
<!-- Header -->
- <header class="row">
- <div class="twelve columns">
- <%= image_tag 'brograms/header1.png', :class => 'heading' %>
- </div>
- </header>
- <div class="row">
- <div class="twelve columns">
- <div class="well">
- <p class="putcenter">Inspired by Bro Code, Brogram is a special message<br/>
- from one bro to another, delivered by a bro.
- </p>
- </div>
- </div>
- </div>
-
-
- <!-- Video -->
- <div class="row">
- <div class="wrapper">
- <div class="flex-video">
- <iframe src="http://www.youtube.com/embed/w8rbCzhUS5Y" frameborder="0" allowfullscreen></iframe>
- </div>
- </div>
- </div>
- <br />
-
- <!-- Images -->
- <div class="row">
- <div class="twelve columns">
- <p class="options">Three browesome options to choose from:</p>
- </div>
- </div>
- <div class="row">
- <div class="four columns">
- <p><%= image_tag 'brograms/hifive.png' %></p>
- </div>
- <div class="four columns">
- <p><%= image_tag 'brograms/icebox.png' %></p>
- </div>
- <div class="four columns">
- <p><%= image_tag 'brograms/lovebox.png' %></p>
- </div>
- </div>
+ <header class="row">
+ <div class="twelve columns">
+ <%= image_tag 'brograms/header1.png', :class => 'heading' %>
+ </div>
+ </header>
- <!-- Web Form -->
-
- <div class="row">
- <div class="twelve columns">
- <form class="nice custom well bottom" action="confirmation.html" id="sendBrogram">
- <h3 class="send">Send a Brogram!</h3>
- <div class="row">
- <div class="six columns">
- <p>
- <label for="yourname"></label>
- <input class="input-text expand" type="text" name="yourname" id="yourname" placeholder="Your Name"/>
- </p>
- </div>
- <div class="six columns">
- <p class="input-text">
- <label for="youremail"></label>
- <input class="input-text expand" type="text" name="youremail" id="youremail" placeholder="Your Email" />
- </p>
- </div>
- </div>
- <div class="row">
- <p class="choice">Send my bro this brogram:</p>
- <ul class="type-of-brogram">
- <li class="mini-hf"><label for="five"><input type="radio" name="type" id="five" style="display: none;" /><span class="custom radio selected"></span></label></li>
- <li class="mini-ic"><label for="ice"><input type="radio" name="type" id="five" style="display: none;" /><span class="custom radio"></span></label></li>
- <li class="mini-lb"><label for="romance"><input type="radio" name="type" id="five" style="display: none;" /><span class="custom radio"></span></label></li>
- </ul>
- </div>
- <div class="row">
- <div class="six columns">
- <p>
- <label for="broname"></label>
- <input class="input-text expand" type="text" name="broname" id="broname" placeholder="Bro's Name" />
- </p>
- </div>
- <div class="six columns">
- <p>
- <label for="broname"></label>
- <input class="input-text expand" type="text" name="broemail" id="broemail" placeholder="Bro's Email" />
- </p>
- </div>
- </div>
- <div class="row">
- <div class="six columns">
- <p>
- <label for="address"></label>
- <input class="input-text expand" type="text" name="address" id="address" placeholder="Bro's Address" />
- </p>
- </div>
- <div class="four columns">
- <label for="city"></label>
- <input type="text" class="expand small input-text" name="city" id="city" placeholder="City" />
-
- </div>
- <div class="two columns">
- <label for="zipcode"></label>
- <input type="text" class="expand small input-text" name="zipcode" id="zipcode" placeholder="Zip Code" />
- </div>
- </div>
- <p>
- <label for="time">Time</label>
- <select id="brogramTime">
- <option>This is a dropdown</option>
- <option>This is another option</option>
- <option>Look, a third option</option>
- </select>
- </p>
- <p class="submit">
- <input type="submit" id="submitBrogram" />
- <!--<input class="large nice radius button" type="submit" value="Submit" /> -->
- </p>
-
- <hr />
- </form>
- </div>
- </div>
+ <%= yield %>
- <!-- Footer -->
- <div class="row">
- <div class="twelve columns">
+ <!-- Footer -->
+ <div class="row">
+ <div class="twelve columns">
<p class="red">MADE BY <a href="http://www.zurb.com"> <%= image_tag 'brograms/logo.png' %></a></p>
</div>
- </div>
- <!-- container -->
-
+ </div>
+ </div>
+ <!-- container -->
View
2 config/routes.rb
@@ -12,7 +12,7 @@
# Sample resource route (maps HTTP verbs to controller actions automatically):
# resources :products
- resources :brograms, :only => :new
+ resources :brograms, :only => [:new, :create]
# Sample resource route with options:
# resources :products do

0 comments on commit 53665bd

Please sign in to comment.