Advertisement
bdorris

Service Claim Raw

Jul 21st, 2012
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.48 KB | None | 0 0
  1. {% extends "musicians/musicians.html" %}
  2.  
  3. {% block musician-content %}
  4. <div id="mus-title">
  5. Service Claim Form
  6. </div>
  7. <br/>
  8.  
  9. <p>A separate form must be filled out for each concert/service week.</p><br/>
  10. <p>All claims submitted by the 20th of the month will be paid on the payrol of that
  11. same month. Any forms submitted after the 20th will appear on the following month's check.
  12. A penalty of five percent (5%) of the total claimed shall be deducted from the payment for
  13. claims made after thirty (30) days following a service.</p><br/>
  14.  
  15. <p>Required fields are in <b>bold</b></p>
  16.  
  17. <form action="" method="post">{% csrf_token %}
  18. {{ form.non_field_errors }}
  19. <div class="fieldWrapper">
  20. {{ form.name.errors }}
  21. <label for="id_name"><b>Your name:</b></label>
  22. {{ form.name }}
  23. </div>
  24. <div class="fieldWrapper">
  25. {{ form.email.errors }}
  26. <label for="id_email"><b>Your email address:</b></label>
  27. {{ form.email }}
  28. </div>
  29. <div class="fieldWrapper">
  30. {{ form.date.errors }}
  31. <label for="id_date"><span class="has-tip" title="Please use format MM/DD/YYYY"><b>Date</b></span></label>
  32. {{ form.date }}
  33. </div>
  34. <div class="fieldWrapper">
  35. {{ form.distance.errors }}
  36. <label for="id_distance">Mileage claim:</label>
  37. {{ form.distance }}
  38. </div>
  39. <div class="fieldWrapper">
  40. {{ form.principal_instrument.errors }}
  41. <label for="id_principal_instrument">Principal instrument:</label>
  42. {{ form.principal_instrument }}
  43. </div>
  44. <div class="fieldWrapper">
  45. {{ form.double_1.errors }}
  46. <label for="id_double_1">Double 1</label>
  47. {{ form.double_1 }}
  48. </div>
  49. <div class="fieldWrapper">
  50. {{ form.double_2.errors }}
  51. <label for="id_double_2">Double 2</label>
  52. {{ form.double_2 }}
  53. </div>
  54. <div class="fieldWrapper">
  55. {{ form.double_3.errors }}
  56. <label for="id_double_3">Double 3</label>
  57. {{ form.double_3 }}
  58. </div>
  59. <div class="fieldWrapper">
  60. {{ form.double_4.errors }}
  61. <label for="id_double_4">Double 4</label>
  62. {{ form.double_4 }}
  63. </div>
  64. <div class="fieldWrapper">
  65. {{ form.service_number.errors }}
  66. <label for="id_service_number"><b>Number of services claimed</b></label>
  67. {{ form.service_number }}
  68. </div>
  69. <div class="fieldWrapper">
  70. {{ form.standard_cartage.errors }}
  71. <label for="id_standard_cartage">Standard cartage</label>
  72. {{ form.standard_cartage }}
  73. </div>
  74. <div class="fieldWrapper">
  75. {{ form.vibes.errors }}
  76. <label for="id_vibes">Vibes</label>
  77. {{ form.vibes }}
  78. </div>
  79. <div class="fieldWrapper">
  80. {{ form.marimba.errors }}
  81. <label for="id_marimba">Marimba</label>
  82. {{ form.marimba }}
  83. </div>
  84. <div class="fieldWrapper">
  85. {{ form.small_diem.errors }}
  86. <label for="id_small_diem">Single per diem</label>
  87. {{ form.small_diem }}
  88. </div>
  89. <div class="fieldWrapper">
  90. {{ form.big_diem.errors }}
  91. <label for="id_big_diem">Double per diem</label>
  92. {{ form.big_diem }}
  93. </div>
  94. <div class="fieldWrapper">
  95. {{ form.comments.errors }}
  96. <label for="id_comments">Comments:</label>
  97. {{ form.comments }}
  98. </div>
  99. <p><input type="submit" value="Submit request" /></p>
  100. </form>
  101.  
  102. <div onload="initialize()">
  103. <form action="#" onsubmit="showLocation(); return false;">
  104. <div id="mus-title">Distance Calculator</div><br/>
  105. <p>Enter city, state (e.g. Little Rock, AR)</p>
  106. <p>
  107. Starting city: <input type="text" name="address1" value="city 1" /><br/>
  108. Destination city: <input type="text" name="address2" value="city 2" />
  109. <input type="submit" value="Get mileage" />
  110. </p>
  111. </form>
  112. </div>
  113.  
  114. <p><i>Please submit a new form for each concert/service week. You will receive an email confirmation
  115. of your submission immediately.</i></p>
  116.  
  117. {% endblock %}
  118.  
  119. {% block reveal %}
  120.  
  121.  
  122. {% endblock %}
  123.  
  124. <script>
  125. var geocoder, location1, location2, gDir;
  126.  
  127. function initialize() {
  128. geocoder = new GClientGeocoder();
  129. gDir = new GDirections();
  130. GEvent.addListener(gDir, "load", function() {
  131. var drivingDistanceMiles = gDir.getDistance().meters / 1609.344;
  132. var drivingDistanceKilometers = gDir.getDistance().meters / 1000;
  133. var drivingDistanceMiles = document.getElementById('id_distance').value;
  134. document.getElementById('id_distance').value = drivingDistanceMiles;
  135. });
  136. }
  137.  
  138. function showLocation() {
  139. geocoder.getLocations(document.forms[0].address1.value, function (response) {
  140. if (!response || response.Status.code != 200)
  141. {
  142. alert("Sorry, we were unable to geocode the first address");
  143. }
  144. else
  145. {
  146. location1 = {lat: response.Placemark[0].Point.coordinates[1], lon: response.Placemark[0].Point.coordinates[0], address: response.Placemark[0].address};
  147. geocoder.getLocations(document.forms[0].address2.value, function (response) {
  148. if (!response || response.Status.code != 200)
  149. {
  150. alert("Sorry, we were unable to geocode the second address");
  151. }
  152. else
  153. {
  154. location2 = {lat: response.Placemark[0].Point.coordinates[1], lon: response.Placemark[0].Point.coordinates[0], address: response.Placemark[0].address};
  155. gDir.load('from: ' + location1.address + ' to: ' + location2.address);
  156. }
  157. });
  158. }
  159. });
  160. }
  161.  
  162. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement