Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

263 lines
8.2KB

  1. <h2><%= H(Model.Title & " " & Model.Kit.Jurisdiction) %></h2>
  2. <%= HTML.Hidden("nonce", HTMLSecurity.GetAntiCSRFToken("KitEditForm")) %>
  3. <%= HTML.Hidden("Id", Model.Kit.ID) %>
  4. <style>
  5. .purple-envelope-report {
  6. max-width: 720px;
  7. margin-top: 1.5rem;
  8. }
  9. .purple-envelope-report .report-title,
  10. .purple-envelope-report .report-election-date {
  11. text-align: center;
  12. }
  13. .purple-envelope-report .report-title {
  14. font-size: 1.4rem;
  15. margin-bottom: 1rem;
  16. }
  17. .purple-envelope-report .report-election-date {
  18. font-size: 1.15rem;
  19. margin-bottom: 1rem;
  20. }
  21. .purple-envelope-report,
  22. .purple-envelope-report table,
  23. .purple-envelope-report th,
  24. .purple-envelope-report td {
  25. font-size: 10pt;
  26. }
  27. .purple-envelope-report table th.num,
  28. .purple-envelope-report table td.num {
  29. text-align: right;
  30. }
  31. .print-page-spacer {
  32. display: none;
  33. }
  34. @media print {
  35. @page {
  36. size: auto;
  37. margin: 0;
  38. }
  39. body * {
  40. visibility: hidden;
  41. }
  42. #purple-envelope-report-print,
  43. #purple-envelope-report-print * {
  44. visibility: visible;
  45. }
  46. #purple-envelope-report-print {
  47. position: absolute;
  48. left: 0;
  49. top: 0;
  50. width: 100%;
  51. padding: 0.45in 0.25in 0.25in 0.25in;
  52. box-sizing: border-box;
  53. }
  54. .d-print-none {
  55. display: none !important;
  56. }
  57. .purple-envelope-report {
  58. max-width: none;
  59. margin-top: 0;
  60. }
  61. .purple-envelope-report thead {
  62. display: table-header-group;
  63. }
  64. .print-page-spacer {
  65. display: table-row;
  66. }
  67. .print-page-spacer th {
  68. border: 0 !important;
  69. height: 0.2in;
  70. padding: 0 !important;
  71. background: transparent !important;
  72. }
  73. }
  74. </style>
  75. <div class="row">
  76. <div class="col-md-6">
  77. <h2>Job Number: <%= Model.Kit.JobNumber %></h2>
  78. <p><strong>Jurisdiction:</strong> <%= Model.Kit.Jurisdiction %></p>
  79. <p><strong>Label Count:</strong> <%= Model.Kit.LabelCount %></p>
  80. <p><strong>Created On:</strong> <%= Model.Kit.CreatedOn %></p>
  81. <p><strong>Labels Printed On :</strong> <%= Model.Kit.LabelsPrinted %></p>
  82. <p><strong>Exported to SnailWorks On:</strong> <%= Model.Kit.ExportedToSnailWorks %></p>
  83. <% If Model.Kit.Status = "Done" Then %>
  84. <p>
  85. <%= HTML.LinkToExt("<i class='glyphicon glyphicon-print'></i> Print Delivery Paperwork", "Kit", "PrintDeliveryPaperwork", Array("Id", Model.Kit.ID), Array("class", "btn btn-primary")) %>
  86. </p>
  87. <% End If %>
  88. <% IF Model.Kit.Status = "Ready To Assign STIDS" THEN %>
  89. <%= HTML.FormTag("Kit","SwitchBoardPurpleEnvelopeEditPost",empty,empty) %>
  90. <%
  91. dim isAscendingInkjetSort : isAscendingInkjetSort = (UCase(Trim(Model.Kit.JobType & "")) = "PURPLE ENVELOPES-ASCENDING")
  92. %>
  93. <p><strong>Amount of Office Copies:</strong></p>
  94. <%= HTML.TextBox("OfficeCopiesAmount","0") %>
  95. <p></p>
  96. <p><strong>Inkjet Sort Order:</strong></p>
  97. <div class="form-check">
  98. <input class="form-check-input" type="radio" name="InkjetSortDirection" id="InkjetSortDirectionDesc" value="DESC" <% If Not isAscendingInkjetSort Then Response.Write("checked") %>>
  99. <label class="form-check-label" for="InkjetSortDirectionDesc">Descending</label>
  100. </div>
  101. <div class="form-check">
  102. <input class="form-check-input" type="radio" name="InkjetSortDirection" id="InkjetSortDirectionAsc" value="ASC" <% If isAscendingInkjetSort Then Response.Write("checked") %>>
  103. <label class="form-check-label" for="InkjetSortDirectionAsc">Ascending</label>
  104. </div>
  105. <p></p>
  106. <p><strong>Select Outbound STID:</strong></p>
  107. <%= HTML.Hidden("nonce", HTMLSecurity.GetAntiCSRFToken("KitEditForm")) %>
  108. <%= HTML.Hidden("Id", Model.Kit.ID) %>
  109. <%= HTML.DropDownListExt("OutboundSTID","hmm",Model.StidDropDown,"STID","OPTION",Array("Class","form-select")) %>
  110. <p></p>
  111. <p><%= HTML.Button("submit", "<i class='glyphicon glyphicon-ok'></i> Save", "btn-primary") %></p>
  112. </form>
  113. <p></p>
  114. <hr>
  115. <h4>Color Assignment</h4>
  116. <div class="card mb-3">
  117. <div class="card-header">
  118. <strong>Assign Color to ALL Labels in Kit</strong>
  119. </div>
  120. <div class="card-body">
  121. <%= HTML.FormTag("Kit","AssignKitColorPost",empty,empty) %>
  122. <%= HTML.Hidden("nonce", HTMLSecurity.GetAntiCSRFToken("ColorAssignForm")) %>
  123. <%= HTML.Hidden("Id", Model.Kit.ID) %>
  124. <div class="row">
  125. <div class="col-md-6">
  126. <label>Select Color for All Labels:</label>
  127. <%= HTML.DropDownListExt("KitColorId","",Model.ColorsDropDown,"ID","Name",Array("Class","form-select")) %>
  128. </div>
  129. <div class="col-md-6">
  130. <p></p>
  131. <%= HTML.Button("submit", "<i class='glyphicon glyphicon-ok'></i> Apply to All", "btn-success") %>
  132. </div>
  133. </div>
  134. </form>
  135. </div>
  136. </div>
  137. <div class="card mb-3">
  138. <div class="card-header">
  139. <strong>Assign Colors by Precinct</strong>
  140. </div>
  141. <div class="card-body">
  142. <%= HTML.FormTag("Kit","AssignPrecinctColorsPost",empty,empty) %>
  143. <%= HTML.Hidden("nonce", HTMLSecurity.GetAntiCSRFToken("ColorAssignForm")) %>
  144. <%= HTML.Hidden("Id", Model.Kit.ID) %>
  145. <table class="table table-striped">
  146. <thead>
  147. <tr>
  148. <th>Precinct</th>
  149. <th>Current Color</th>
  150. <th>Assign New Color</th>
  151. </tr>
  152. </thead>
  153. <tbody>
  154. <%
  155. dim precinctIt : set precinctIt = Model.Precincts.Iterator
  156. dim precinctRow
  157. dim colorsRS
  158. Do While precinctIt.HasNext
  159. set precinctRow = precinctIt.GetNext()
  160. %>
  161. <tr>
  162. <td><%= H(precinctRow.PRECINCT) %></td>
  163. <td>
  164. <% If Not IsNull(precinctRow.ColorId) AND Len(precinctRow.ColorId) > 0 Then %>
  165. <% dim currentColor : set currentColor = ColorsRepository.FindByID(precinctRow.ColorId) %>
  166. <%= H(currentColor.Name) %>
  167. <% Else %>
  168. <em>Not assigned</em>
  169. <% End If %>
  170. </td>
  171. <td>
  172. <%
  173. set colorsRS = ColorsRepository.GetColorsDropDownRS()
  174. %>
  175. <%= HTML.DropDownListExt("PrecinctColor_" & precinctRow.PRECINCT, precinctRow.ColorId, colorsRS, "ID", "Name", Array("Class","form-select form-select-sm")) %>
  176. </td>
  177. </tr>
  178. <%
  179. Loop
  180. %>
  181. </tbody>
  182. </table>
  183. <p><%= HTML.Button("submit", "<i class='glyphicon glyphicon-ok'></i> Save Precinct Colors", "btn-primary") %></p>
  184. </form>
  185. </div>
  186. </div>
  187. <% ELSE %>
  188. <p><strong>Office Copies Amount :</strong> <%= Model.Kit.OfficeCopiesAmount %></p>
  189. <% END IF %>
  190. </div>
  191. </div>
  192. <div class="row">
  193. <div class="col-12" id="purple-envelope-report-print">
  194. <div class="card mb-3 purple-envelope-report">
  195. <div class="card-header d-flex justify-content-between align-items-center">
  196. <strong>Purple Envelope Ballot Range Report</strong>
  197. <button type="button" class="btn btn-secondary btn-sm d-print-none" onclick="window.print();">Print Report</button>
  198. </div>
  199. <div class="card-body">
  200. <div class="report-title"><%= H(Model.Kit.Jurisdiction & " " & Model.Kit.JCode) %></div>
  201. <% If Len(Trim(Model.PurpleEnvelopeElectionLabel & "")) > 0 Then %>
  202. <div class="report-election-date"><%= H(Model.PurpleEnvelopeElectionLabel) %></div>
  203. <% End If %>
  204. <table class="table table-striped table-bordered mb-0">
  205. <thead>
  206. <tr class="print-page-spacer" aria-hidden="true">
  207. <th colspan="5"></th>
  208. </tr>
  209. <tr>
  210. <th>Precinct</th>
  211. <th class="num">Low Ballot Number</th>
  212. <th class="num">High Ballot Number</th>
  213. <th class="num">Missing Count</th>
  214. <th>Missing Numbers</th>
  215. </tr>
  216. </thead>
  217. <tbody>
  218. <%
  219. dim ballotRangeIt : set ballotRangeIt = Model.PrecinctBallotRanges.Iterator
  220. dim ballotRangeRow
  221. If ballotRangeIt.HasNext Then
  222. Do While ballotRangeIt.HasNext
  223. set ballotRangeRow = ballotRangeIt.GetNext()
  224. %>
  225. <tr>
  226. <td><%= H(ballotRangeRow.PRECINCT) %></td>
  227. <td class="num"><%= H(ballotRangeRow.LowBallotNumber) %></td>
  228. <td class="num"><%= H(ballotRangeRow.HighBallotNumber) %></td>
  229. <td class="num"><% If ballotRangeRow.MissingCount > 0 Then %><strong><%= H(ballotRangeRow.MissingCount) %></strong><% Else %>0<% End If %></td>
  230. <td><small><%= H(ballotRangeRow.MissingNumbers) %></small></td>
  231. </tr>
  232. <%
  233. Loop
  234. Else
  235. %>
  236. <tr>
  237. <td colspan="5">No precinct ballot data found for this kit.</td>
  238. </tr>
  239. <%
  240. End If
  241. %>
  242. </tbody>
  243. </table>
  244. </div>
  245. </div>
  246. </div>
  247. </div>

Powered by TurnKey Linux.