Advertisement
mcbrune

Template and Generated HTML/CSS/JS

Jun 14th, 2016
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.22 KB | None | 0 0
  1. ############################# part of index.html
  2.  
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <meta charset="utf-8">
  7. <title>Delphix Self-Service Portal</title>
  8. {% load staticfiles %}
  9. <link href="/static/css/dassp.css" type="text/css" rel="stylesheet">
  10. <link href="/static/css/dropzone.css" type="text/css" rel="stylesheet">
  11. </head>
  12. <body>
  13. <div class="container">
  14. <div style="margin-top:30px;" class="navbar"><img src="/static/img/delphix_logo.png" style="width:130px"></div>
  15. <div class="navbar">
  16. <div class="navbar-inner">
  17. <div style="position:absolute;" class="pull-left">
  18. <h2 style="margin:0px;" class="text-slim">Solution Architecture Portal</h2>
  19. </div>
  20. <ul class="nav pull-right">
  21. <li class="active"><a href="#"><span class="text-bold">NEW SIZING</span></a></li>
  22. </ul>
  23. </div>
  24. </div>
  25. <div style="margin-top:60px;" class="panel">
  26. <div style="padding:60px" class="panel-body">
  27. <h3 style="margin:0px; margin-bottom:20px !important;" class="text-slim">Self-Service Sizing</h3>
  28. <form action="{% url "index" %}" id="myDropzone" method="post" enctype="multipart/form-data">
  29. {% csrf_token %}
  30.  
  31. <input type="hidden" name="_token" value="tokenized value">
  32. <input name="company_name" placeholder="Customer Name" class="i-delphix form-control">
  33. <input name="email_addr" placeholder="Email" style="margin-top:10px;" class="i-delphix form-control">
  34.  
  35. <div id="myDropzone" class="dropzone dz-delphix">
  36. <div class="fallback">
  37. <input type="file" name="docfile">
  38. </div>
  39. </div>
  40. <div style="margin-top:30px;" class="text-center">
  41. <button type="submit" class="btn btn-danger text-slim">SUBMIT</button>
  42. </div>
  43. </form>
  44. </div>
  45. </div>
  46. <div class="navbar">&nbsp;</div>
  47. </div>
  48.  
  49. <script src="/static/js/jquery.min.js"></script>
  50. <script src="/static/js/dropzone.js"></script>
  51.  
  52. <script>
  53. Dropzone.options.myDropzone =
  54. {
  55. paramName: "docfile",
  56. url: "index.html",
  57. dictDefaultMessage: "Drop the sizing files here or click to upload.",
  58. dictRemoveFile: "Remove",
  59.  
  60. // Prevents Dropzone from uploading dropped files immediately
  61.  
  62. autoProcessQueue : false,
  63.  
  64. init : function()
  65. {
  66. var submitButton = document.querySelector("#submit-all")
  67. myDropzone = this;
  68.  
  69. submitButton.addEventListener("click", function()
  70. {
  71. myDropzone.processQueue();
  72. myDropzone.preventDefault();
  73. myDropzonee.stopPropagation();
  74. // Tell Dropzone to process all queued files.
  75. });
  76.  
  77. // You might want to show the submit button only when
  78. // files are dropped here:
  79. this.on("addedfile", function()
  80. {
  81. // Show submit button here and/or inform user to click it.
  82. });
  83.  
  84. }
  85. };
  86. </script>
  87. </body>
  88. </html>
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95. ############################################## generated HTML/CSS/JS that does not work... i.e. the file doesn't upload
  96.  
  97. <!DOCTYPE html>
  98. <html>
  99. <head>
  100. <meta charset="utf-8">
  101. <title>Delphix Self-Service Portal</title>
  102.  
  103. <link href="/static/css/dassp.css" type="text/css" rel="stylesheet">
  104. <link href="/static/css/dropzone.css" type="text/css" rel="stylesheet">
  105. </head>
  106. <body>
  107. <div class="container">
  108. <div style="margin-top:30px;" class="navbar"><img src="/static/img/delphix_logo.png" style="width:130px"></div>
  109. <div class="navbar">
  110. <div class="navbar-inner">
  111. <div style="position:absolute;" class="pull-left">
  112. <h2 style="margin:0px;" class="text-slim">Solution Architecture Portal</h2>
  113. </div>
  114. <ul class="nav pull-right">
  115. <li class="active"><a href="#"><span class="text-bold">NEW SIZING</span></a></li>
  116. </ul>
  117. </div>
  118. </div>
  119. <div style="margin-top:60px;" class="panel">
  120. <div style="padding:60px" class="panel-body">
  121. <h3 style="margin:0px; margin-bottom:20px !important;" class="text-slim">Self-Service Sizing</h3>
  122. <form action="/sizeEstimate/" id="myDropzone" method="post" enctype="multipart/form-data">
  123. <input type='hidden' name='csrfmiddlewaretoken' value='PaY5K4eoVKhPA6IzQssk4AwMsaTPSS3x' />
  124.  
  125. <input type="hidden" name="_token" value="tokenized value">
  126. <input name="company_name" placeholder="Customer Name" class="i-delphix form-control">
  127. <input name="email_addr" placeholder="Email" style="margin-top:10px;" class="i-delphix form-control">
  128.  
  129. <div id="myDropzone" class="dropzone dz-delphix">
  130. <div class="fallback">
  131. <input type="file" name="docfile">
  132. </div>
  133. </div>
  134. <div style="margin-top:30px;" class="text-center">
  135. <button type="submit" class="btn btn-danger text-slim">SUBMIT</button>
  136. </div>
  137. </form>
  138. </div>
  139. </div>
  140. <div class="navbar">&nbsp;</div>
  141. </div>
  142.  
  143. <script src="/static/js/jquery.min.js"></script>
  144. <script src="/static/js/dropzone.js"></script>
  145.  
  146. <script>
  147. Dropzone.options.myDropzone =
  148. {
  149. paramName: "docfile",
  150. url: "index.html",
  151. dictDefaultMessage: "Drop the sizing files here or click to upload.",
  152. dictRemoveFile: "Remove",
  153.  
  154. // Prevents Dropzone from uploading dropped files immediately
  155.  
  156. autoProcessQueue : false,
  157.  
  158. init : function()
  159. {
  160. var submitButton = document.querySelector("#submit-all")
  161. myDropzone = this;
  162.  
  163. submitButton.addEventListener("click", function()
  164. {
  165. myDropzone.processQueue();
  166. myDropzone.preventDefault();
  167. myDropzonee.stopPropagation();
  168. // Tell Dropzone to process all queued files.
  169. });
  170.  
  171. // You might want to show the submit button only when
  172. // files are dropped here:
  173. this.on("addedfile", function()
  174. {
  175. // Show submit button here and/or inform user to click it.
  176. });
  177.  
  178. }
  179. };
  180. </script>
  181. </body>
  182. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement