signup.html 3.33 KB
Newer Older
1
{% extends 'layouts/base.html' %}
Jean Michel Rouly's avatar
Jean Michel Rouly committed
2 3 4


{% block title %}
Jean Michel Rouly's avatar
Jean Michel Rouly committed
5
Go - Signup
Jean Michel Rouly's avatar
Jean Michel Rouly committed
6 7 8 9
{% endblock %}


{% block content %}
Chris Reffett's avatar
Chris Reffett committed
10 11 12
<div class="page-header" id="banner">
  <div class="row">
    <div class="col-md-12">
Jean Michel Rouly's avatar
Jean Michel Rouly committed
13

Chris Reffett's avatar
Chris Reffett committed
14
      <h1><strong>Signup</strong></h1>
Jean Michel Rouly's avatar
Jean Michel Rouly committed
15

Chris Reffett's avatar
Chris Reffett committed
16 17 18 19 20
    </div>
  </div>
</div>

<div class="row">
21
{% if not registered %}
Chris Reffett's avatar
Chris Reffett committed
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
  <div class="col-md-12">
    <p>
      In order to succesfully provide this service, users must be manually
      approved. This prevents misuse of the URL shortener. Please indicate below
      if you are interested.
    <br/><br/>
    </p>
  </div>

  <div class="col-md-8">
    <div class="well">

      <form class="form-horizontal" method="post" action="{% url 'signup' %}">
      {% csrf_token %}
        <fieldset>

          {% if form.non_field_errors %}
          <div class="form-group has-error">
            <div class="col-md-12">
            {% for error in form.non_field_errors %}
              <span class="help-block">{{ error }}</p>
            {% endfor %}
            </div>
          </div>
          {% endif %}

          {% if form.username.errors %}
          <div class="form-group has-error">
          {% else %}
          <div class="form-group">
          {% endif %}
            <div class="col-md-4">
              <label class="control-label" for="{{ form.username.id_for_label }}">
              {{ form.username.label }}</label>
            </div>

            <div class="col-md-8">
              {{ form.username }}

              {% for error in form.username.errors %}
              <span class="help-block">{{error}}</span>
              {% endfor %}
            </div>
          </div>

          {% if form.full_name.errors %}
          <div class="form-group has-error">
          {% else %}
          <div class="form-group">
          {% endif %}
            <div class="col-md-4">
              <label class="control-label" for="{{ form.full_name.id_for_label }}">
              {{ form.full_name.label }}</label>
            </div>

            <div class="col-md-8">
              {{ form.full_name }}

              {% for error in form.full_name.errors %}
              <span class="help-block">{{error}}</span>
              {% endfor %}
            </div>
          </div>

          {% if form.description.errors %}
          <div class="form-group has-error">
          {% else %}
          <div class="form-group">
          {% endif %}
            <div class="col-md-4">
              <label class="control-label" for="{{ form.description.id_for_label }}">
              {{ form.description.label }}</label>
            </div>

            <div class="col-md-8">
              {{ form.description }}

              {% for error in form.description.errors %}
              <span class="help-block">{{error}}</span>
              {% endfor %}
            </div>
          </div>

          <div class="form-group">
            <div class="col-md-12">
              <input type="submit" value="Submit"
              class="btn btn-primary btn-lg btn-block" />
            </div>
          </div>

        </fieldset>
      </form>
    </div>
115
  </div>
Chris Reffett's avatar
Chris Reffett committed
116

117
{% else %}
118 119 120 121 122 123 124 125 126
  {% if not approved %}
    <div class="col-md-12">
      <p>You have already submitted a request for approval to use Go.</p>
    </div>
  {% else %}
    <div class="col-md-12">
      <p>You are already approved to use Go.</p>
    </div>
  {% endif %}
127
{% endif %}
Chris Reffett's avatar
Chris Reffett committed
128
</div>
Jean Michel Rouly's avatar
Jean Michel Rouly committed
129
{% endblock %}