Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ############################# part of index.html
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Delphix Self-Service Portal</title>
- {% load staticfiles %}
- <link href="/static/css/dassp.css" type="text/css" rel="stylesheet">
- <link href="/static/css/dropzone.css" type="text/css" rel="stylesheet">
- </head>
- <body>
- <div class="container">
- <div style="margin-top:30px;" class="navbar"><img src="/static/img/delphix_logo.png" style="width:130px"></div>
- <div class="navbar">
- <div class="navbar-inner">
- <div style="position:absolute;" class="pull-left">
- <h2 style="margin:0px;" class="text-slim">Solution Architecture Portal</h2>
- </div>
- <ul class="nav pull-right">
- <li class="active"><a href="#"><span class="text-bold">NEW SIZING</span></a></li>
- </ul>
- </div>
- </div>
- <div style="margin-top:60px;" class="panel">
- <div style="padding:60px" class="panel-body">
- <h3 style="margin:0px; margin-bottom:20px !important;" class="text-slim">Self-Service Sizing</h3>
- <form action="{% url "index" %}" id="myDropzone" method="post" enctype="multipart/form-data">
- {% csrf_token %}
- <input type="hidden" name="_token" value="tokenized value">
- <input name="company_name" placeholder="Customer Name" class="i-delphix form-control">
- <input name="email_addr" placeholder="Email" style="margin-top:10px;" class="i-delphix form-control">
- <div id="myDropzone" class="dropzone dz-delphix">
- <div class="fallback">
- <input type="file" name="docfile">
- </div>
- </div>
- <div style="margin-top:30px;" class="text-center">
- <button type="submit" class="btn btn-danger text-slim">SUBMIT</button>
- </div>
- </form>
- </div>
- </div>
- <div class="navbar"> </div>
- </div>
- <script src="/static/js/jquery.min.js"></script>
- <script src="/static/js/dropzone.js"></script>
- <script>
- Dropzone.options.myDropzone =
- {
- paramName: "docfile",
- url: "index.html",
- dictDefaultMessage: "Drop the sizing files here or click to upload.",
- dictRemoveFile: "Remove",
- // Prevents Dropzone from uploading dropped files immediately
- autoProcessQueue : false,
- init : function()
- {
- var submitButton = document.querySelector("#submit-all")
- myDropzone = this;
- submitButton.addEventListener("click", function()
- {
- myDropzone.processQueue();
- myDropzone.preventDefault();
- myDropzonee.stopPropagation();
- // Tell Dropzone to process all queued files.
- });
- // You might want to show the submit button only when
- // files are dropped here:
- this.on("addedfile", function()
- {
- // Show submit button here and/or inform user to click it.
- });
- }
- };
- </script>
- </body>
- </html>
- ############################################## generated HTML/CSS/JS that does not work... i.e. the file doesn't upload
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Delphix Self-Service Portal</title>
- <link href="/static/css/dassp.css" type="text/css" rel="stylesheet">
- <link href="/static/css/dropzone.css" type="text/css" rel="stylesheet">
- </head>
- <body>
- <div class="container">
- <div style="margin-top:30px;" class="navbar"><img src="/static/img/delphix_logo.png" style="width:130px"></div>
- <div class="navbar">
- <div class="navbar-inner">
- <div style="position:absolute;" class="pull-left">
- <h2 style="margin:0px;" class="text-slim">Solution Architecture Portal</h2>
- </div>
- <ul class="nav pull-right">
- <li class="active"><a href="#"><span class="text-bold">NEW SIZING</span></a></li>
- </ul>
- </div>
- </div>
- <div style="margin-top:60px;" class="panel">
- <div style="padding:60px" class="panel-body">
- <h3 style="margin:0px; margin-bottom:20px !important;" class="text-slim">Self-Service Sizing</h3>
- <form action="/sizeEstimate/" id="myDropzone" method="post" enctype="multipart/form-data">
- <input type='hidden' name='csrfmiddlewaretoken' value='PaY5K4eoVKhPA6IzQssk4AwMsaTPSS3x' />
- <input type="hidden" name="_token" value="tokenized value">
- <input name="company_name" placeholder="Customer Name" class="i-delphix form-control">
- <input name="email_addr" placeholder="Email" style="margin-top:10px;" class="i-delphix form-control">
- <div id="myDropzone" class="dropzone dz-delphix">
- <div class="fallback">
- <input type="file" name="docfile">
- </div>
- </div>
- <div style="margin-top:30px;" class="text-center">
- <button type="submit" class="btn btn-danger text-slim">SUBMIT</button>
- </div>
- </form>
- </div>
- </div>
- <div class="navbar"> </div>
- </div>
- <script src="/static/js/jquery.min.js"></script>
- <script src="/static/js/dropzone.js"></script>
- <script>
- Dropzone.options.myDropzone =
- {
- paramName: "docfile",
- url: "index.html",
- dictDefaultMessage: "Drop the sizing files here or click to upload.",
- dictRemoveFile: "Remove",
- // Prevents Dropzone from uploading dropped files immediately
- autoProcessQueue : false,
- init : function()
- {
- var submitButton = document.querySelector("#submit-all")
- myDropzone = this;
- submitButton.addEventListener("click", function()
- {
- myDropzone.processQueue();
- myDropzone.preventDefault();
- myDropzonee.stopPropagation();
- // Tell Dropzone to process all queued files.
- });
- // You might want to show the submit button only when
- // files are dropped here:
- this.on("addedfile", function()
- {
- // Show submit button here and/or inform user to click it.
- });
- }
- };
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement