You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by ma...@redhat.com on 2011/08/19 14:42:31 UTC

[PATCH 3/3] Fix new blob form to work with jquery mobile - metadata params weren't being captured and have to disable ajax for file upload to work correctly.

From: marios <ma...@redhat.com>


Signed-off-by: marios <ma...@redhat.com>
---
 server/views/blobs/new.html.haml |   29 +++++++++++++++--------------
 1 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/server/views/blobs/new.html.haml b/server/views/blobs/new.html.haml
index abfe24e..93cd9c7 100644
--- a/server/views/blobs/new.html.haml
+++ b/server/views/blobs/new.html.haml
@@ -1,26 +1,27 @@
 =header "Create new blob"
 
 %div{ :'data-role' => :content, :'data-theme' => 'c', :class => 'middle-dialog'}
-  %form{ :action => bucket_url(@bucket_id), :method => :post, :enctype => 'multipart/form-data'}
+  %form{ :action => bucket_url(@bucket_id), :method => :post, :enctype => 'multipart/form-data', "data-ajax" => "false"}
     %div{ 'data-role' => :fieldcontain }
       %label
         Blob Name:
       %input{ :name => 'blob_id', :size => 512}/
-      %input{ :type => "hidden", :name => "meta_params", :value => "0"}
-    %a{ :href => "javascript:;", :onclick => "more_fields();"} Add Metadata
-    %div{ :id => "metadata_holder", :style => "display: none;", :'data-role' => :fieldcontain}
-      %div{ 'data-role' => :fieldcontain }
-        %label
-          Metadata Key:
-        %input{ :type => "text", :name => "meta_name", :value => ""}/
-      %div{ 'data-role' => :fieldcontain }
-        %label
-          Metadata Value:
-        %input{ :type => "text", :name => "meta_value", :value => ""}/
-    %a{ :href => "javascript:;", :onclick => "less_fields();"} Less Metadata
     %div{ 'data-role' => :fieldcontain }
       %label
         Blob Data:
       %input{ :type => "file", :name => 'blob_data', :size => 50}/
-
+    %input{ :type => "hidden", :name => "meta_params", :value => "0"}
+    %a{ :href => "javascript:;", :onclick => "more_fields();"} Add Metadata
+    %div{ :id => "metadata_holder", :style => "display: none;", :'data-role' => :fieldcontain}
+      %label
+        Metadata Key:
+      %input{ :type => "text", :name => "meta_name", :value => ""}/
+      %br
+      %label
+        Metadata Value:
+      %input{ :type => "text", :name => "meta_value", :value => ""}/
+      %br
+    %a{ :href => "javascript:;", :onclick => "less_fields();"} Less Metadata
+    %br
+    %br
     %input{ :type => :submit, :name => "commit", :value => "create"}/
-- 
1.7.3.4