From f4435fdfd6e872844bc1626a90678a652fb7bdcc Mon Sep 17 00:00:00 2001 From: Sanj Date: Wed, 1 Jun 2011 18:26:18 +0530 Subject: [PATCH] add some help for upload --- edgware/files/views.py | 2 +- edgware/templates/upload_files.html | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/edgware/files/views.py b/edgware/files/views.py index 08f0c43..c5f866b 100644 --- a/edgware/files/views.py +++ b/edgware/files/views.py @@ -45,7 +45,7 @@ def add_category(request): c = Category() c.name = category_name c.save() - return render_to_json_response({'category_id': c.id}) + return render_to_json_response({'category_id': c.id, 'category_name': c.name}) class FolderSelect(forms.widgets.Select): def _get_choices(self): diff --git a/edgware/templates/upload_files.html b/edgware/templates/upload_files.html index e227e6a..cbba37d 100644 --- a/edgware/templates/upload_files.html +++ b/edgware/templates/upload_files.html @@ -19,9 +19,11 @@ $(function() { }; $.getJSON("/files/add_category", params, function(response) { var category_id = response.category_id; + var category_name = response.category_name; $('#files_category').val(category_id); $('#categoryWrapper').hide(); $('#addFilesWrapper').show(); + $('#uploadStudy').text(category_name); }); }); @@ -82,6 +84,13 @@ $(function() { background-color: #005740; } +#uploadStudy { + font-weight: bold; +} + +#uploadingTo { + margin-bottom: 12px; +} {% endblock %} @@ -90,6 +99,9 @@ $(function() { {% block body %}
+
+ First, either pick an existing Study to add your files to, or put in a name of a new study to create to add files to, and click the submit button: +
{{ categoryForm.as_p }} @@ -97,6 +109,12 @@ $(function() {
+
+ Uploading To: +
+
+ Either select multiple files, or just drag any number of files from your computer to the browser to upload. Enjoy. +