2018-04-30 14:58:10 +02:00
|
|
|
{% load widget_tweaks %}
|
|
|
|
|
2018-04-30 20:31:59 +02:00
|
|
|
{% if reply %}
|
2018-05-01 20:44:56 +02:00
|
|
|
<form method="post" action="{% url "reply" toot.id %}" enctype="multipart/form-data">
|
2018-04-30 20:31:59 +02:00
|
|
|
{% else %}
|
2018-05-01 20:44:56 +02:00
|
|
|
<form method="post" action="{% url "toot" %}" enctype="multipart/form-data">
|
2018-04-30 20:31:59 +02:00
|
|
|
{% endif %}
|
2018-04-30 14:58:10 +02:00
|
|
|
{% csrf_token %}
|
|
|
|
|
2018-04-30 23:59:30 +02:00
|
|
|
<div class="field">
|
|
|
|
<label class="label"> {{ form.spoiler_text.label }}</label>
|
|
|
|
<div class="control">
|
|
|
|
{% render_field form.spoiler_text class+="input" placeholder="Optional" %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2018-04-30 14:58:10 +02:00
|
|
|
<div class="field" >
|
|
|
|
<label class="label" >{{ form.status.label }}</label>
|
|
|
|
<div class="control">
|
|
|
|
{% render_field form.status class+="textarea is-primary" rows="4" %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="field">
|
|
|
|
<label class="label" > {{ form.visibility.label }}</label>
|
2018-04-30 23:59:30 +02:00
|
|
|
<div class="control has-icons-left">
|
2018-04-30 14:58:10 +02:00
|
|
|
<div class="select">
|
|
|
|
{% render_field form.visibility class+="select"%}
|
|
|
|
<span class="icon is-small is-left" >
|
|
|
|
<i class="fa address-card"></i>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-05-01 20:44:56 +02:00
|
|
|
|
2018-05-10 13:27:45 +02:00
|
|
|
<div class="field has-addons">
|
|
|
|
<div class="file">
|
2018-05-09 20:44:45 +02:00
|
|
|
<label class="file-label">
|
|
|
|
{% render_field form.media_file_1 class+="file-input" %}
|
|
|
|
<span class="file-cta">
|
|
|
|
<span class="file-icon">
|
|
|
|
<i class="fa fa-upload"></i>
|
|
|
|
</span>
|
2018-05-10 13:27:45 +02:00
|
|
|
<span class="file-label" id="media_filename_1">
|
2018-05-09 20:44:45 +02:00
|
|
|
{{ form.media_file_1.label }}
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</label>
|
2018-05-01 20:44:56 +02:00
|
|
|
</div>
|
2018-05-10 13:27:45 +02:00
|
|
|
<div class="control is-expanded">
|
2018-05-01 20:44:56 +02:00
|
|
|
{% render_field form.media_text_1 class+="input" placeholder="Describe attachment" %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2018-05-18 14:00:12 +02:00
|
|
|
<div class="field has-addons">
|
|
|
|
<div class="file">
|
|
|
|
<label class="file-label">
|
|
|
|
{% render_field form.media_file_2 class+="file-input" %}
|
|
|
|
<span class="file-cta">
|
|
|
|
<span class="file-icon">
|
|
|
|
<i class="fa fa-upload"></i>
|
|
|
|
</span>
|
|
|
|
<span class="file-label" id="media_filename_2">
|
|
|
|
{{ form.media_file_2.label }}
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="control is-expanded">
|
|
|
|
{% render_field form.media_text_2 class+="input" placeholder="Describe attachment" %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="field has-addons">
|
|
|
|
<div class="file">
|
|
|
|
<label class="file-label">
|
|
|
|
{% render_field form.media_file_3 class+="file-input" %}
|
|
|
|
<span class="file-cta">
|
|
|
|
<span class="file-icon">
|
|
|
|
<i class="fa fa-upload"></i>
|
|
|
|
</span>
|
|
|
|
<span class="file-label" id="media_filename_3">
|
|
|
|
{{ form.media_file_3.label }}
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="control is-expanded">
|
|
|
|
{% render_field form.media_text_3 class+="input" placeholder="Describe attachment" %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field has-addons">
|
|
|
|
<div class="file">
|
|
|
|
<label class="file-label">
|
|
|
|
{% render_field form.media_file_4 class+="file-input" %}
|
|
|
|
<span class="file-cta">
|
|
|
|
<span class="file-icon">
|
|
|
|
<i class="fa fa-upload"></i>
|
|
|
|
</span>
|
|
|
|
<span class="file-label" id="media_filename_4">
|
|
|
|
{{ form.media_file_4.label }}
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="control is-expanded">
|
|
|
|
{% render_field form.media_text_4 class+="input" placeholder="Describe attachment" %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2018-05-09 20:44:45 +02:00
|
|
|
|
2018-05-01 20:44:56 +02:00
|
|
|
<div>
|
|
|
|
{{ form.errors }}
|
|
|
|
</div>
|
|
|
|
|
2018-04-30 23:59:30 +02:00
|
|
|
<div class="field">
|
|
|
|
<div class="control">
|
|
|
|
<input type="submit" class="button is-primary"
|
|
|
|
name="toot" value="Toot">
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-05-09 20:44:45 +02:00
|
|
|
</form>
|
|
|
|
|
2018-05-15 16:06:09 +02:00
|
|
|
{% if not fullbrutalism %}
|
2018-05-09 20:44:45 +02:00
|
|
|
<script type="application/javascript">
|
2018-05-18 14:00:12 +02:00
|
|
|
var file1 = document.getElementById("id_media_file_1");
|
|
|
|
file1.onchange = function(){
|
|
|
|
if (file1.files.length > 0)
|
2018-05-09 20:44:45 +02:00
|
|
|
{
|
2018-05-18 14:00:12 +02:00
|
|
|
document.getElementById('media_filename_1').innerHTML = file1.files[0].name;
|
2018-05-09 20:44:45 +02:00
|
|
|
}
|
|
|
|
};
|
2018-05-18 14:00:12 +02:00
|
|
|
var file2 = document.getElementById("id_media_file_2");
|
|
|
|
file2.onchange = function(){
|
|
|
|
if (file2.files.length > 0)
|
|
|
|
{
|
|
|
|
document.getElementById('media_filename_2').innerHTML = file2.files[0].name;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
var file3 = document.getElementById("id_media_file_3");
|
|
|
|
file3.onchange = function(){
|
|
|
|
if (file3.files.length > 0)
|
|
|
|
{
|
|
|
|
document.getElementById('media_filename_3').innerHTML = file3.files[0].name;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
var file4 = document.getElementById("id_media_file_4");
|
|
|
|
file4.onchange = function(){
|
|
|
|
if (file4.files.length > 0)
|
|
|
|
{
|
|
|
|
document.getElementById('media_filename_4').innerHTML = file4.files[0].name;
|
|
|
|
}
|
|
|
|
};
|
2018-05-09 20:44:45 +02:00
|
|
|
</script>
|
2018-05-15 16:06:09 +02:00
|
|
|
{% endif %}
|