{% extends "base.html" %}

{% block page-title %}Snipt for Teams{% endblock %}

{% block body-class %}{{ block.super }} static signup pro pro-signup{% endblock %}

{% block extra-scripts %}
  <script type="text/javascript" src="https://js.stripe.com/v1/"></script> 
{% endblock %}

{% block js %}
  {{ block.super }}
  {% if debug %}
    Stripe.setPublishableKey('pk_test_cgknmaWRMQeJt2adEdvH3T9l');
  {% else %}
    Stripe.setPublishableKey('pk_live_gUO2nCl7dhx6j0posz6gnbhA');
  {% endif %}
{% endblock %}

{% block breadcrumb %}
  <li><a href="/for-teams/">Snipt for Teams</a></li>
{% endblock %}

{% block content %}
  {% if request.GET.declined %}
    <div class="alert alert-error" style="margin: 30px;">
      <strong>{{ request.GET.declined }}</strong> You have not been charged. Please try again.
    </div>
  {% endif %}
  <form class="form-horizontal static-box" id="pro-signup" method="post" action="/for-teams/complete/">
    <fieldset>
      <div class="info">
        Snipt for Teams
        <ul class="features">
          <li>Team profile at snipt.net/{team-name}.</li>
          <li>Members can create and edit public and private snippets on a team.</li>
          <li>Detailed log of changes on a snippet, including user and code diffs.</li>
          <li>Maintain a public team profile by posting public snippets.</li>
          <li>All team members are automatically granted personal <a href="/pro/"><span class="pro">Pro</span></a> accounts.</li>
          <li>Plans from $49/month, each with a 14-day free trial.</li>
        </ul>
      </div>
      {% if not request.user.is_authenticated %}
          <div class="login-first">
            <span>
              To create a team, <a href="/signup/?next=/for-teams/">sign up</a> or <a href="/login/?next=/for-teams/">log in</a>.
            </span>
          </div>
        {% else %}
          <div class="payment-form">
            <div class="payment-loading -teams"><span>Please wait&hellip;</span></div>
            <div class="payment-errors alert alert-error"></div>
            <div class="control-group">
              <label class="control-label" for="team-name">Team name:</label>
              <div class="controls">
                <input maxlength="30" required type="text" class="input-xlarge" name="team-name" id="team-name" />
                <p class="sub" style="margin-top: 3px; color: #999999;">
                  Maximum of 30 characters.
                </p>
              </div>
            </div>
            <div class="control-group">
              <label class="control-label" for="email">Team email:</label>
              <div class="controls">
                <input required type="email" class="input-xlarge" name="email" id="email" />
                <p class="sub" style="margin-top: 3px; color: #999999;">
                  For billing and your team's Gravatar. Will remain private.
                </p>
              </div>
            </div>
            <div class="control-group">
              <label class="control-label" for="plan">Payment plan:</label>
              <div class="controls">
                <select name="plan" type="text" class="input-xlarge" id="plan">
                  <option value="snipt-teams-25-monthly">25 users - $49/month</option>
                  <option value="snipt-teams-100-monthly">100 users - $149/month</option>
                  <option value="snipt-teams-250-monthly">250 users - $299/month</option>
                  <option value="snipt-teams-unlimited-monthly">Unlimited users - $499/month</option>
                  <option value="snipt-teams-25-yearly">25 users - $588/year</option>
                  <option value="snipt-teams-100-yearly">100 users - $1,788/year</option>
                  <option value="snipt-teams-250-yearly">250 users - $3,588/year</option>
                  <option value="snipt-teams-unlimited-yearly">Unlimited users - $5,988/year</option>
                </select>
                <p class="sub" style="margin-top: 3px; color: #999999;">
                  Free 14-day trial (your card won't be charged until then, and you can cancel at any time).
                </p>
              </div>
            </div>
            <div class="control-group">
              <label class="control-label" for="number">Card number:</label>
              <div class="controls cards">
                <input type="text" class="input-xlarge" id="number" />
                <img src="{{ STATIC_URL }}img/card-visa.png" alt="Visa" />
                <img src="{{ STATIC_URL }}img/card-mastercard.png" alt="MasterCard" />
                <img src="{{ STATIC_URL }}img/card-discover.png" alt="Discover" />
                <img src="{{ STATIC_URL }}img/card-american-express.png" alt="American Express" />
              </div>
            </div>
            <div class="control-group">
              <label class="control-label" for="exp-month">Expiration date:</label>
              <div class="controls">
                <select id="exp-month" class="span2 exp-month">
                  <option value="">----</option>
                  <option value="01">01 - January</option>
                  <option value="02">02 - February</option>
                  <option value="03">03 - March</option>
                  <option value="04">04 - April</option>
                  <option value="05">05 - May</option>
                  <option value="06">06 - June</option>
                  <option value="07">07 - July</option>
                  <option value="08">08 - August</option>
                  <option value="09">09 - September</option>
                  <option value="10">10 - October</option>
                  <option value="11">11 - November</option>
                  <option value="12">12 - December</option>
                </select>
                <select id="exp-year" class="span2">
                  <option value="">----</option>
                  <option value="2015">2015</option>
                  <option value="2016">2016</option>
                  <option value="2017">2017</option>
                  <option value="2018">2018</option>
                  <option value="2019">2019</option>
                  <option value="2020">2020</option>
                  <option value="2021">2021</option>
                  <option value="2022">2022</option>
                  <option value="2023">2023</option>
                  <option value="2024">2024</option>
                  <option value="2025">2025</option>
                </select>
              </div>
            </div>
            <div class="control-group">
              <label class="control-label" for="cvc">Security code (CVC):</label>
              <div class="controls">
                <input type="text" class="input-min span1" id="cvc">
              </div>
            </div>
          </div>
          <div class="form-actions">
            {% csrf_token %}
            <button type="submit" class="btn btn-success">Create team &raquo;</button>
            <div class="security">
              <a href="https://stripe.com/help/security">Secure</a> by default. Every Snipt page is secure.
            </div>
            <div class="stripe" style="margin-left: 125px;">
              Your credit card is stored securely with <a href="https://stripe.com">Stripe</a> and we use <a href="https://stripe.com/docs/stripe.js">Stripe.js</a> for maximum security.
            </div>
          </div>
        {% endif %}
    </fieldset>
  </form>
{% endblock %}

{% block analytics %}
  {% if not debug %}
    window.ll('tagScreen', 'Team beta signup view');
  {% endif %}
{% endblock %}
