summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorMichael Foster <savetheinternet@tinyboard.org>2013-08-12 22:51:46 +1000
committerMichael Foster <savetheinternet@tinyboard.org>2013-08-12 22:51:46 +1000
commit0de0bc6ceb2c56256bf87724572055297dae76af (patch)
tree56e44e86247aa5b18a4e82ca38af13c5dcab3c17 /templates
parenta7a93ece3d96acb24c589662f49d28675c83c913 (diff)
Optional: Allow uploading by URL
Diffstat (limited to 'templates')
-rw-r--r--templates/main.js2
-rw-r--r--templates/post_form.html7
2 files changed, 8 insertions, 1 deletions
diff --git a/templates/main.js b/templates/main.js
index 71dcd92a..78054a3b 100644
--- a/templates/main.js
+++ b/templates/main.js
@@ -175,7 +175,7 @@ function dopost(form) {
saved[document.location] = form.elements['body'].value;
sessionStorage.body = JSON.stringify(saved);
- return form.elements['body'].value != "" || form.elements['file'].value != "";
+ return form.elements['body'].value != "" || form.elements['file'].value != "" || (form.elements.file_url && form.elements['file_url'].value != "");
}
function citeReply(id) {
diff --git a/templates/post_form.html b/templates/post_form.html
index 4d7a37b7..7c8894c1 100644
--- a/templates/post_form.html
+++ b/templates/post_form.html
@@ -73,6 +73,13 @@
</th>
<td>
<input type="file" name="file">
+ {% if config.allow_upload_by_url %}
+ <br>
+ <div style="float:none;text-align:left">
+ <label for="file_url">{% trans %}Or URL{% endtrans %}</label>:
+ <input style="display:inline" type="text" id="file_url" name="file_url" size="35">
+ </div>
+ {% endif %}
{{ antibot.html() }}
</td>
</tr>