<commit_before><h3>Borrow Gear</h3>

<div class="col-lg-12">
	<h5>Person Borrowing Gear</h5>
	<table id='personTable' class='table'></table>
</div>
<br/>

<h5>Select your gear</h5>
<table id='dataTable' class='table'></table>
<br/>

<form action='../borrow/save' method="post">
	<div class="form-group col-lg-12">
		<label for="sel1">Gear selected;</label>
		<select class="form-control" multiple="multiple" id="sel1" height="8" data-bind="
			options:gear_list,
			selectedOptions:selectedItems,
			optionsText: function(item) {
				return item.name+' - '+item.age
			}">
		</select>
		<button class="btn btn-default" data-bind="click: removeSelected, enable: selectedItems().length > 0">Remove</button>
	</div>

	<input type="hidden" name="gear_selected" data-bind="value: ko.toJSON(gear_list)" />
	<input type="hidden" name="person_borrowing" data-bind="value: ko.toJSON(selectedPerson)" />

	<div class="form-group">
		<input type="submit" class="btn btn-default" data-bind="enable: gear_list().length>0 && selectedPerson() != undefined">
	</div>
</form>

<script>
	$(document).ready(function() {
		model = new ViewModel(<?php echo json_encode($data) ?>);
		ko.applyBindings(model);

		model.init();
	})<commit_msg>added deposit and comments to input form (not used as input)<commit_after><h3>Borrow Gear</h3>

<div class="col-lg-12">
	<h5>Person Borrowing Gear</h5>
	<table id='personTable' class='table'></table>
</div>
<br/>

<h5>Select your gear</h5>
<table id='dataTable' class='table'></table>
<br/>

<form action='../borrow/save' method="post">
	<div class="form-group col-lg-12">
		<label for="sel1">Gear selected;</label>
		<select class="form-control" multiple="multiple" id="sel1" height="8" data-bind="
			options:gear_list,
			selectedOptions:selectedItems,
			optionsText: function(item) {
				return item.name+' - '+item.age
			}">
		</select>
		<button class="btn btn-default" data-bind="click: removeSelected, enable: selectedItems().length > 0">Remove</button>
	</div>

	<input type="hidden" name="gear_selected" data-bind="value: ko.toJSON(gear_list)" />
	<input type="hidden" name="person_borrowing" data-bind="value: ko.toJSON(selectedPerson)" />
	
	<h4>Deposit</h4>
	<input type="text" class="form-control" name="deposit">

	<h4>Comments</h4>
	<input type="text" class="form-control" name="commments"/>
	
	<div class="form-group">
		<input type="submit" class="btn btn-default" data-bind="enable: gear_list().length>0 && selectedPerson() != undefined">
	</div>
</form>

<script>
	$(document).ready(function() {
		model = new ViewModel(<?php echo json_encode($data) ?>);
		ko.applyBindings(model);

		model.init();
	})
{'fraction_non_alphanumeric': 0.20090805902383654, 'fraction_numerical': 0.012864169504351116, 'mean_word_length': 5.512315270935961, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 75, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4022452', 'n_tokens_mistral': 997, 'n_tokens_neox': 932, 'n_words': 184}