2013-10-13 18:41:03 +02:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
2013-10-13 22:30:25 +02:00
|
|
|
|
2013-10-13 22:01:52 +02:00
|
|
|
{% block title %} New paste {% endblock %}
|
2013-10-13 18:41:03 +02:00
|
|
|
|
2013-10-13 22:30:25 +02:00
|
|
|
|
|
|
|
{% block headeraddons %}
|
|
|
|
<script src="{{STATIC_URL}}js/jquery-1.10.2.min.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
|
|
|
$("input[type='file']").each(function () {
|
|
|
|
$(this).hide();
|
|
|
|
$(this).after(' <a href="#" class="browsebutton pure-button button-lightblue">Browse</a>');
|
|
|
|
$(this).after('<input type="text" readonly/>');
|
|
|
|
|
|
|
|
$(this).change(function() {
|
|
|
|
$(this).next().val($(this).val());
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
$(".browsebutton").click(function() {
|
|
|
|
$(this).prev().prev().click();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
2013-10-13 18:41:03 +02:00
|
|
|
{% block content %}
|
|
|
|
<div id="content">
|
|
|
|
<div id="prompt">
|
|
|
|
<!-- if IE without GCF, prompt goes here -->
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<h1>New paste</h1>
|
|
|
|
<div class="pure-g-r">
|
|
|
|
<div class="pure-u-2-3">
|
|
|
|
<div class="textcontainer">
|
|
|
|
<form enctype="multipart/form-data" method="post" class="pure-form pure-form-aligned">
|
|
|
|
{% csrf_token %}
|
|
|
|
<fieldset>
|
|
|
|
{% for field in form %}
|
|
|
|
<div class="pure-control-group">
|
|
|
|
{{ field.label_tag }}
|
|
|
|
{{ field }}
|
|
|
|
{{ field.errors }}
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
<div class="pure-control-group">
|
|
|
|
<label for="submitbutton" >... and </label>
|
|
|
|
<input class="pure-button button-green" id="submitbutton" type="submit" value="Upload" />
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="pure-u-1-3">
|
|
|
|
<div class="textcontainer">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endblock %}
|