upload.twig 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. {% extends "templates/app.twig" %}
  2. {% block content %}
  3. <div class="page-header">
  4. <h1>File Successfully Submitted</h1>
  5. </div>
  6. {% for message in messages %}
  7. {{ makeError(message[0], message[1], message[2]) | raw }}
  8. {% endfor %}
  9. <div class="col-md-6">
  10. <div class="panel panel-warning">
  11. <div class="panel-heading">Confirm Print Preview</div>
  12. <div class="panel-body">
  13. <label>Open print preview in new tab:</label><br>
  14. <a class="btn btn-success" href="{{ link }}" target="_blank">View Print Preview</a><br><br>
  15. <div class="radio">
  16. <label><input id="ok" value="ok" type="radio" name="optradio"><span class="text-success" style="font-weight: bold;">Looks Good!</span></label>
  17. </div>
  18. <div class="radio">
  19. <label><input id="no" value="no" type="radio" name="optradio"><span class="text-danger" style="font-weight: bold;">Somethings Wrong?</span></label>
  20. </div>
  21. </div>
  22. </div>
  23. </div>
  24. <div class="col-md-6">
  25. <div id="print" style="display: none" class="panel panel-success">
  26. <div class="panel-heading">Success: Ready to Print</div>
  27. <div class="panel-body">
  28. <form action="/print" method="post">
  29. <div class="form-group">
  30. <label for="printer">Choose Printer:</label>
  31. <select name="printer" class="form-control" id="printer">
  32. {% for id, name in printers %}
  33. <option value="{{id}}">{{name}}</option>
  34. {% endfor %}
  35. </select>
  36. <label for="copies">Select number of copies:</label>
  37. <select name="copies" class="form-control" id="copies">
  38. <option selected="selected">1</option>
  39. <option>2</option>
  40. <option>3</option>
  41. <option>4</option>
  42. <option>5</option>
  43. <option>6</option>
  44. <option>7</option>
  45. <option>8</option>
  46. <option>9</option>
  47. <option>10</option>
  48. <option>11</option>
  49. <option>12</option>
  50. <option>13</option>
  51. <option>14</option>
  52. <option>15</option>
  53. <option>16</option>
  54. <option>17</option>
  55. <option>18</option>
  56. <option>19</option>
  57. <option>20</option>
  58. </select>
  59. <input type="hidden" name="path" value="{{path}}">
  60. <br>
  61. <input type="submit" value="Submit" class="btn btn-success">
  62. </div>
  63. </form>
  64. </div>
  65. </div>
  66. </div>
  67. <div class="col-md-6">
  68. <div id="esc" style="display: none" class="panel panel-danger">
  69. <div class="panel-heading">Failed!</div>
  70. <div class="panel-body">
  71. <p>Try uploading a PDF, or use the public PCs on the 2nd Floor</p>
  72. <a href="/" class="btn btn-danger">Return to Homepage</a>
  73. </div>
  74. </div>
  75. </div>
  76. {% endblock %}
  77. {% block js %}
  78. <script>
  79. $('input:radio[name="optradio"]').change(function(){
  80. if($(this).val() === 'ok'){
  81. document.getElementById("print").style.display = "block";
  82. document.getElementById("esc").style.display = "none";
  83. }
  84. if($(this).val() === 'no'){
  85. document.getElementById("esc").style.display = "block";
  86. document.getElementById("print").style.display = "none";
  87. }
  88. });
  89. </script>
  90. {% endblock %}