Commits

Maciej Wiśniowski committed 59cb4ce

fix for issue 18 - do not allow to upload images if content is not yet created

  • Participants
  • Parent commits 08cbcfb

Comments (0)

Files changed (1)

File lfc/templates/lfc/manage/filebrowser_images.html

     </table>
 
     <h1 class="middle">{% trans "Upload local images" %}</h1>
+    {% if not obj_id %}
+        {% trans "You have to save content object before you can upload images for it." %}
+    {% else %}
     <form action="{% url lfc_fb_upload_image %}"
           method="post"
           enctype="multipart/form-data">
         <input type="file" name="image" />
         <input type="submit" />
     </form>
+    {% endif %}
 {% endblock %}