{{!
    This file is part of Moodle - http://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    @template mod_booking/signin_downloadform

    Classes required for JS:
    * none

    Data attributes required for JS:
    * data-region

    Context variables required for this template:
    * see mod/booking/classes/output/signin_download.php

    This template is initially hidden, and is only displayed after the current user info has been loaded.

	Example context (json):
	{
		"id": "7",
		"optionid": "1",
		"titleoption": "AERIAL YOGA",
		"titleinstanceoption": "ws 22/23 - AERIAL YOGA",
		"instanceoption": "ws 22/23",
		"baseurl": "/mod/booking/report.php",
		"teachersexist": true,
		"sessions": [
			{
			"sessiondateonly": "3 March 2023",
			"coursestarttime": "3 March 2023, 10:30 AM",
			"courseendtime": "3 March 2023, 11:45 AM",
			"id": "1"
			},
			{
			"sessiondateonly": "10 March 2023",
			"coursestarttime": "10 March 2023, 10:30 AM",
			"courseendtime": "10 March 2023, 11:45 AM",
			"id": "2"
			}
		]
	}

}}
<div class="card hidden mt-3 mb-5" id="signinsheet" aria-hidden="true">
    <form data-region="booking-download-signinsheet-form" method="get" action="{{baseurl}}">
		<div class="card-header">
			<h5 class="card-title mb-0">
				<i class="fa fa-list fa-fw" aria-hidden="true"></i>&nbsp;{{#str}}signinsheetconfigure, mod_booking{{/str}}
			</h5>
		</div>
	    <div class="card-body p-y-4">
		    <input name="optionid" type="hidden" value="{{optionid}}">
		    <input name="id" type="hidden" value="{{id}}">
		    <input name="action" type="hidden" value="downloadsigninsheet">
		    <div class="container-fluid">
			    <div class="row p-y-1 mt-3">
				    <div class="col-md-4 span4 col-4">
						<input id="signin-portrait" checked="checked" type="radio" class="m-r-1" name="orientation" value="P"><label for="signin-portrait">{{#str}}pdfportrait, mod_booking{{/str}}</label><br>
					    <input id="signin-landscape" type="radio" class="m-r-1" name="orientation" value="L"><label for="signin-landscape">{{#str}}pdflandscape, mod_booking{{/str}}</label><br>
				    </div>
				    <div class="col-md-4 span4 col-4">
						<input id="signin-sort-lastname" checked="checked" type="radio" class="m-r-1" name="orderby" value="lastname"><label for="signin-sort-lastname">{{#str}}sortbylastname, grades{{/str}}</label><br>
					    <input id="signin-sort-firstname" type="radio" class="m-r-1" name="orderby" value="firstname"><label for="signin-sort-firstname">{{#str}}sortbyfirstname, grades{{/str}}</label><br>
					</div>
					<div class="col-md-4 span4 col-4">
						<label for="signin-addemptyrows">{{#str}}signinaddemptyrows, mod_booking{{/str}}</label>
						<div>
							<select name="addemptyrows" id="signin-addemptyrows" class="custom-select">
								<option value="0" selected>0</option>
								<option value="1">1</option>
								<option value="2">2</option>
								<option value="3">3</option>
								<option value="4">4</option>
								<option value="5">5</option>
								<option value="6">6</option>
								<option value="7">7</option>
								<option value="8">8</option>
								<option value="9">9</option>
								<option value="10">10</option>
								<option value="20">20</option>
								<option value="40">40</option>
								<option value="80">80</option>
							</select>
						</div>
					</div>
				</div>
				<div class="row  p-y-1 mt-3">
				    <div class="col-md-6 span6 col-6">
					    <label for="signin-pdftitle">{{#str}}choosepdftitle, mod_booking{{/str}}</label>
					    <div>
						    <select name="pdftitle" id="signin-pdftitle" class="custom-select">
						        <option value="1" selected>{{titleinstanceoption}}</option>
						        <option value="2">{{titleoption}}</option>
						        <option value="3">{{instanceoption}}</option>
						    </select>
					    </div>
				    </div>
				    <div class="col-md-6 span6 col-6">
					    <label for="signin-onesession">{{#str}}signinonesession, mod_booking{{/str}}</label>
					    <div>
						    <select name="pdfsessions" id="signin-onesession" class="custom-select">
								<option value="0">{{#str}} all {{/str}}</option>
								<option value="-1">{{#str}} signinadddatemanually, booking {{/str}}</option>
								<option value="-2" selected>{{#str}} signinhidedate, booking {{/str}}</option>
						        {{#sessions}}
						        <option value="{{id}}">{{coursestarttime}} - {{courseendtime}}</option>
						        {{/sessions}}
						    </select>
					    </div>
				    </div>
			    </div>
				<div class="row  p-y-1 mt-3">
					{{#teachersexist}}
					<div class="col-md-6 span6 col-6">
						<label for="includeteachers">{{#str}}includeteachers, mod_booking{{/str}}</label>
						<input id="includeteachers" class="usercheckbox" name="includeteachers" value="1" type="checkbox">
					</div>
					{{/teachersexist}}
					<div class="col-md-6 span6 col-6">
						<label for="signinextrasessioncols">{{#str}}signinextrasessioncols, mod_booking{{/str}}</label>
					    <div>
						    <select name="signinextrasessioncols" id="signinextrasessioncols" class="custom-select">
								<option value="-1">{{#str}}none{{/str}}</option>
								<option value="0" selected>{{#str}}all{{/str}}</option>
						        {{#sessions}}
						        <option value="{{id}}">{{sessiondateonly}}</option>
						        {{/sessions}}
						    </select>
					    </div>
					</div>
				</div>
		    </div>
		</div>
		<div class="card-footer">
			<button type="submit" class="btn btn-primary btn-sm" name="downloadsigninsheet">
				<i class="fa fa-download fa-fw" aria-hidden="true"></i>&nbsp;{{#str}} signinsheetdownload, mod_booking {{/str}}
			</button>
		</div>
	</form>
</div>
