-
Notifications
You must be signed in to change notification settings - Fork 0
/
form_customer_terminate.html
51 lines (42 loc) · 1.97 KB
/
form_customer_terminate.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE html>
<!-- COMPLETED --->
<html>
<head>
<base target="_top">
<link rel="stylesheet" href="https://ssl.gstatic.com/docs/script/css/add-ons1.css">
</head>
<body onload="initForm();">
<form id="rentalForm" onsubmit="event.preventDefault(); google.script.run.terminateCustomerRental(this);">
<span>Uthyrningstyp:</span><br>
<select id="itemListRentalObjectType" name="itemListRentalObjectType" onchange="updateForm();updateCustomerRentalPeriod(1);">
<option value="0">Bilbarnstol</option>
<option value="1">Babyskydd</option>
</select><br>
<span>Uthyrningsobjekt:</span><br>
<select id="itemListChair" name="itemListRentalObject" onchange="updateCustomerList();updateCustomerRentalPeriod(1);"></select>
<select id="itemListCarrier" name="itemListRentalObject" onchange="updateCustomerList();updateCustomerRentalPeriod(1);" hidden disabled>
<option value="0">Korttid</option>
<option value="1">Långtid</option>
</select>
<br>
<span>Kund:</span><br>
<select id="itemListCustomer" name="itemListCustomer" onchange="updateCustomerRentalPeriod(0);"></select><br>
<span>Utlämnades:</span><br>
<input type="date" name="dateOut" id="dateOut" disbled><br>
<span>Återlämnas:</span><br>
<input type="date" name="dateIn" id="dateIn" disabled><br><br>
<input type="submit" value="Avsluta">
</form>
</body>
<?!= include('template_item_list'); ?>
<script>
function initForm(){
createListFromSheetColumn("Bilbarnstol", 2, "getChairNumber", 3, 9, "Chair");
createListFromSheetColumn("Bilbarnstol", 4, 8, 3, 1, "Customer");
setCustomerRentalPeriod(0, 0, 0); //Sets dateOut and DateIn values on document load
}
</script>
<?!= include('template_customer_rental_period'); ?>
<?!= include('template_customer_list'); ?>
<?!= include('template_update_chair_form'); ?>
</html>