<div class="tabbable">
  <ul id="myTab" class="nav nav-tabs">
    <li class="active"><a href="#tab1" data-toggle="tab">Market Order</a></li>
    <li class=""><a href="#tab2" data-toggle="tab">Stop Order</a></li>
    <li class=""><a href="#tab3" data-toggle="tab">Limit Order</a></li>
  </ul>
  <div id="myTabContent" class="tab-content">
    <div class="tab-pane fade active in" id="tab1">
      <%= form_for :market_order, :url => league_portfolio_orders_path do |f| %>
      <div>
        <%= f.label :ticker %>
        <%= f.text_field :ticker, :placeholder => "Enter company ticker" %>
      </div>
      <div>
        <%=  f.label :quantity  %>
        <%=  f.number_field :quantity %>
      </div>
      <div>
        <%= f.label :trade_type, "What type of trade would you like?" %>
        <%= f.select :trade_type, [["Buy", 'buy'], ["Sell",'sell'],["Short Sell",'short'],["Buy to Cover",'cover']] %>
      </div>
      <div>
        <%= f.submit "Submit", class: "btn btn-large btn-primary" %>
      </div>
      <% end  %>
    </div>
    <div class="tab-pane fade" id="tab2">
      <%= form_for :stop_order, :url => league_portfolio_orders_path  do |f| %>
      <div>
        <%= f.label :ticker %>
        <%= f.text_field :ticker, :placeholder => "Enter company ticker" %>
      </div>
      <div>
        <%=  f.label :quantity  %>
        <%=  f.number_field :quantity %>
      </div>
      <div>
        <div>
          <%= f.label :trade_type, "What type of trade would you like?" %>
          <%= f.select :trade_type, [["Buy", 'buy'], ["Sell",'sell']] %>
        </div>
      </div>
      <div>
        <%= f.label :threshold_price, "At what price would you like this order triggered?" %>
        <%= f.text_field :threshold_price %>
      </div>
      <div>
      	<%= f.label :duration_valid, "How long would you like this order to remain valid?" %>
      	<%= f.number_field :duration_valid, :in => 0..60 %>
      </div>
      <div>
        <%= f.submit "Submit", class: "btn btn-large btn-primary" %>
      </div>
      <% end  %>
    </div>
    <div class="tab-pane fade" id="tab3">
      <%= form_for :limit_order, :url => league_portfolio_orders_path do |f| %>
      <div>
        <%= f.label :ticker %>
        <%= f.text_field :ticker, :placeholder => "Enter company ticker" %>
      </div>
      <div>
        <%=  f.label :quantity  %>
        <%=  f.number_field :quantity %>
      </div>
      <div>
        <%= f.label :trade_type, "What type of trade would you like?" %>
        <%= f.select :trade_type, [["Buy", 'buy'], ["Sell",'sell']] %>
      </div>
      <div>
        <%= f.label :threshold_price, "At what price would you like this order triggered?" %>
        <%= f.text_field :threshold_price %>
      </div>
      <div>
      	<%= f.label :duration_valid, "How long would you like this order to remain valid?" %>
        <%= f.number_field :duration_valid, :in => 0..60 %>
      </div>
      <div>
        <%= f.submit "Submit", class: "btn btn-large btn-primary" %>
      </div>
      <% end  %>
    </div>
  </div>
</div>
