	[% META title="Print Authorised Reports" %]

<!-- BEGIN printrun/default.tt -->
	[% # PROCESS dumper.tt dump = data %]

    <h3 class="header">Print Authorised Reports</h3>

    [% # PROCESS site/js/jquery.tt # already loaded in html_wrapper %]
    <script type="text/javascript" src="/js/jquery.dateentry.min.js"></script>
	<script type="text/javascript" src="/js/jquery.mousewheel.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#defaultEntry').dateEntry({
                spinnerImage: '/images/spinner/spinnerOrange.png',
                dateFormat: 'Wny ', // space or char after def
            });
        });
		function submitForm(s) {
			s.value = "Calculating, please wait ...";
	 		return true;
		}
	</script>

    [% IF printrun_pdf; USE date(format = '%d.%b.%Y') %]
        <p class="indent info">Load pre-formatted [% date.format %] print run &#187;
            <a href="[% c.cfg('settings').base_href; '/'; printrun_pdf %]"
                class="image" target="_new"><img src="/images/pdf.png" /></a>
        </p>
    [% END %]
	<form action="[% app_url %]/printrun/do" method="get" id="printRun"
			onsubmit="return submitForm(this.submit);" name="printRun">
		<table class="borderless">
			<tr>
				<td>
					<ul class="indent">
						<li>
							authorised on <b>[% auth_date.strftime('%A, %d %B %Y') %]</b>
							   <label>
									<input type="checkbox" name="last_working_day" value="1" />
								</label> including today?
								<label>
									<input type="checkbox" name="today" value="1" />
								</label>
						</li>

						<li>
							reports from:
							<input type="text" name="date" id="defaultEntry" size="19" />
								including today?
							<label>
								<input type="checkbox" name="today" value="1" />
							</label>
						</li>
					</ul>
        </td>
        <td rowspan="2">
          <label>
            <input type="submit" value="Go" name="submit" class="button" />
          </label>
        </td>
      </tr>
		</table>
	</form>
