Commit ed03bd4e authored by Jean Michel Rouly's avatar Jean Michel Rouly Committed by Chris Reffett
Browse files

Bootstrapped index page.

parent 4542ea40
...@@ -7,52 +7,109 @@ Go - A URL Shortener ...@@ -7,52 +7,109 @@ Go - A URL Shortener
{% block content %} {% block content %}
<h3>~Shorten URL~</h3>
{% for error in form.non_field_errors %} <div class="page-header" id="banner">
<p class="error">{{ error }}</p> <div class="row">
{% endfor %} <div class="col-md-12">
<form method="post" action="{%url 'index'%}"> <h1><strong>Shorten URL</strong></h1>
{% csrf_token %}
<label for="{{ form.target.id_for_label }}">{{ form.target.label }}</label> </div>
<br/> </div>
{% for error in form.target.errors %} </div>
<p class="error">{{error}}</p>
{% empty %} <div class="row">
<br /> <div class="col-md-6">
<div class="well">
<form class="form-horizontal" method="post" action="{%url 'index'%}">
{% 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 %} {% endfor %}
</div>
</div>
{% endif %}
{% if form.target.errors %}
<div class="form-group has-error">
{% else %}
<div class="form-group">
{% endif %}
<div class="col-md-4">
<label class="control-label" for="{{ form.target.id_for_label }}">
{{ form.target.label }}</label>
</div>
<div class="col-md-8">
{{ form.target }} {{ form.target }}
<br/><br/>
<label for="{{ form.short.id_for_label }}">{{ form.short.label }}</label> {% for error in form.target.errors %}
<br/> <span class="help-block">{{error}}</span>
{% for error in form.short.errors %}
<p class="error">{{error}}</p>
{% empty %}
<br />
{% endfor %} {% endfor %}
</div>
</div>
{% if form.short.errors %}
<div class="form-group has-error">
{% else %}
<div class="form-group">
{% endif %}
<div class="col-md-4">
<label class="control-label" for="{{ form.short.id_for_label }}">
{{ form.short.label }}</label>
</div>
<div class="col-md-8">
{{ form.short }} {{ form.short }}
<br/><br/>
<div class="radio-container"> {% for error in form.short.errors %}
<label for="{{ form.expires.id_for_label }}">{{ form.expires.label }}</label> <span class="help-block">{{error}}</span>
<br/>
{% for error in form.expires.errors %}
<p class="error">{{error}}</p>
{% empty %}
<br/>
{% endfor %} {% endfor %}
</div>
</div>
{% if form.expires.errors %}
<div class="form-group has-error">
{% else %}
<div class="form-group">
{% endif %}
<div class="col-md-4">
<label class="control-label" for="{{ form.expires.id_for_label }}">
{{ form.expires.label }}</label>
</div>
<div class="col-md-8">
{% for option in form.expires %} {% for option in form.expires %}
<p>
{{ option }} {{ option }}
</p>
{% endfor %} {% endfor %}
<br/><br/>
{% for error in form.expires.errors %}
<span class="help-block">{{error}}</span>
{% endfor %}
</div>
</div>
<div class="form-group">
<div class="col-md-12">
<input type="submit" value="Shorten"
class="btn btn-primary btn-lg btn-block" />
</div>
</div> </div>
<input type="submit" value="Shorten" /> </fieldset>
<br/><br/> </form>
</form> </div>
</div>
</div>
{% endblock %} {% endblock %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment