diff --git a/brutaldon/static/js/brutaldon-enhancements.js b/brutaldon/static/js/brutaldon-enhancements.js index 8d5bcbe..defdaf3 100644 --- a/brutaldon/static/js/brutaldon-enhancements.js +++ b/brutaldon/static/js/brutaldon-enhancements.js @@ -93,3 +93,36 @@ function expandCWButtonPrepare() }); }; } + +function fileButtonUpdaters() +{ + var file1 = document.getElementById("id_media_file_1"); + file1.onchange = function(){ + if (file1.files.length > 0) + { + document.getElementById('media_filename_1').innerHTML = file1.files[0].name; + } + }; + 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; + } + }; + +} diff --git a/brutaldon/templates/main/post_partial.html b/brutaldon/templates/main/post_partial.html index 9c91391..c1f04c4 100644 --- a/brutaldon/templates/main/post_partial.html +++ b/brutaldon/templates/main/post_partial.html @@ -5,7 +5,7 @@ {% elif redraft %}
- - {% if not preferences.theme.is_brutalist %} - - {% endif %} +{% if not preferences.theme.is_brutalist %} + +{% endif %} +