UploadProgress: upload_progress_form.rhtml

File upload_progress_form.rhtml, 1.3 kB (added by cduque, 7 months ago)

Original file replacement after adding the javascript include and also token_tag hidden field

Line 
1 <html>
2   <head>
3     <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
4     <title>mongrel test</title>
5     <%= javascript_include_tag :defaults %>
6     <%= javascript_include_tag 'upload_progress_javascript' %>   
7 <style type="text/css">
8 #progress-bar {
9   width:500px;
10   height:25px;
11   margin:15px;
12   border:solid 1px #000;
13   position:relative;
14 }
15
16 #progress-bar #status-bar {
17   display:block;
18   height:25px;
19   width:0;
20   background-color:#00f;
21   border-right:solid 1px #000;
22   position:absolute;
23   top:0; left:0;
24 }
25
26 #progress-bar #status-text {
27   display:block;
28   padding: 0 15px;
29   line-height:25px;
30   position:absolute;
31   top:0; left:0;
32 }
33 </style>
34   </head>
35   <body>
36
37 <p><%= link_to (@upid = Time.now.to_i.to_s), :action => 'status', :upload_id => @upid %></p>
38 <%= form_tag({:action => 'upload', :upload_id => @upid}, {:multipart => true, :target => 'upload',
39              :onsubmit => "UploadProgress.monitor('#{escape_javascript @upid}')"}) %>
40   <div id="file-fields">
41     <p><%= file_field_tag :data %></p>
42   </div>
43   <p><%= link_to_function 'Add File Field', 'UploadProgress.FileField.add()' %>
44   </p>
45   <p><%= submit_tag :Upload %></p>
46   <%=token_tag%>
47 </form>
48
49 <div id="results"></div>
50 <div id="progress-bar"></div>
51
52 <iframe id="upload" name="upload" src="about:blank"></iframe>
53
54   </body>
55 </html>