<commit_before><div class="page-wrapper" ng-controller="FormItemCtrl">
	<div class="page-header">
		<h1>View Form</h1>
	</div>
	<div class="well well-lg">
		<strong>Form ID</strong><br>{{form._id}}
	</div>
	<div class="well well-lg">
		<strong>Form Name</strong><br>{{form.title}}
	</div>

	<div>
		<p class="lead">Please fill in the following fields:</p>

		<form role="form" ng-submit="submit()" class="form-inline">

			<div ng-repeat="field in form.fields" class="text">

				<label>{{field.label}}</label><br />
			
				<div data-ng-switch on="field.type">
					
					<div ng-switch-when="checkbox">
						<div ng-repeat="value in field.values">
							<label>
								<input type="checkbox" name="{{value.id}}" ng-true-value="{{value.id}}" ng-false-value="" ng-model="results.results[$parent.$index].values[$index]" /> {{value.name}}
							</label>
						</div>
					</div>

					<div ng-switch-when="radio">
						<div ng-repeat="value in field.values">
							<label>
								<input type="radio" name="{{field.field_id}}" value="{{value.id}}" ng-true-value="{{value.id}}" ng-false-value="" ng-model="results.results[$parent.$index].values[$index]" /> {{value.name}}
							</label>
						</div>
					</div>

					<div ng-switch-when="select">
						<div>
							<select ng-model="results.results[$parent.$index].values[0]" ng-options="c.id as c.name for c in field.values" class="form-control"><option value="">-- Select --</option></select>
						</div>
					</div>
					
					<div ng-switch-when="text" >
						<div>
							<input type="hidden" value="field.id" ng-model="results.results[$index].id">
							<input type="text" name="field.label" ng-model="results.results[$index].values[0]" class="form-control" />
						</div>
					</div>

				</div>
			</div>

			<p><hr></p>
			<div class="row">
				<div class="col-xs-6">
					<a href="#/forms" class="btn btn-default" role="button"><span class="glyphicon glyphicon-arrow-left"></span> Back to Forms List</a>
				</div>
				<div class="col-xs-6">
					<button class="btn btn-primary pull-right" type="submit">Submit &raquo;</button>
				</div>
			</div>
		</form>
	</div>
		
	<div ng-show="showResults" ng-controller="FormResultsCtrl">
		<table class="result-table">
			<tr ng-repeat="result in formResults" ng-model="result">
				<td>{{result._id}}</td>
				<td>{{result.submitted}}</td>
			</tr>
		</table>
		
		<p><hr></p>
		
		<p><a href="#/forms" class="btn btn-default" role="button"><span class="glyphicon glyphicon-arrow-left"></span> Back to Forms List</a></p>
	</div>

	<p>&nbsp;</p>
</div><commit_msg>Added some Bootstrap styling<commit_after><div class="page-wrapper" ng-controller="FormItemCtrl">
	<div class="page-header">
		<h1>{{form.title}}</h1>
	</div>
	<div class="well well-lg">
		<strong>Form ID</strong><br>{{form._id}}
	</div>

	<div class="panel panel-default">
		<div class="panel-heading">Please fill in this form</div>
		<div class="panel-body">

			<form role="form" ng-submit="submit()">

				<div ng-repeat="field in form.fields" class="form-group">

					<label>{{field.label}}</label><br />
				
					<div data-ng-switch on="field.type">
						
						<div ng-switch-when="checkbox">
							<div ng-repeat="value in field.values">
								<label>
									<input type="checkbox" name="{{value.id}}" ng-true-value="{{value.id}}" ng-false-value="" ng-model="results.results[$parent.$index].values[$index]" /> {{value.name}}
								</label>
							</div>
						</div>

						<div ng-switch-when="radio">
							<div ng-repeat="value in field.values">
								<label>
									<input type="radio" name="{{field.field_id}}" value="{{value.id}}" ng-true-value="{{value.id}}" ng-false-value="" ng-model="results.results[$parent.$index].values[$index]" /> {{value.name}}
								</label>
							</div>
						</div>

						<div ng-switch-when="select">
							<div>
								<select ng-model="results.results[$parent.$index].values[0]" ng-options="c.id as c.name for c in field.values" class="form-control"><option value="">-- Select --</option></select>
							</div>
						</div>
						
						<div ng-switch-when="text" >
							<div>
								<input type="hidden" value="field.id" ng-model="results.results[$index].id">
								<input type="text" name="field.label" ng-model="results.results[$index].values[0]" class="form-control" />
							</div>
						</div>

					</div>
				</div>

				<p><hr></p>
				<div class="row">
					<div class="col-xs-6">
						<a href="#/forms" class="btn btn-default" role="button"><span class="glyphicon glyphicon-arrow-left"></span> Back to Forms List</a>
					</div>
					<div class="col-xs-6">
						<button class="btn btn-primary pull-right" type="submit">Submit &raquo;</button>
					</div>
				</div>
			</form>
		</div>
	</div>
	

	<div ng-show="showResults" ng-controller="FormResultsCtrl" class="panel panel-default">
		<div class="panel-heading">{{form._id}} Form Submission Results</div>
		<div class="panel-body">
			<table class="result-table">
				<tr ng-repeat="result in formResults" ng-model="result">
					<td>{{result._id}}</td>
					<td>{{result.submitted}}</td>
				</tr>
			</table>

		</div>
	</div>

	<div>
		<p><a href="#/forms" class="btn btn-default" role="button"><span class="glyphicon glyphicon-arrow-left"></span> Back to Forms List</a></p>
	</div>

	<p>&nbsp;</p>
</div>
{'fraction_non_alphanumeric': 0.224037558685446, 'fraction_numerical': 0.0022535211267605635, 'mean_word_length': 3.220285261489699, 'pattern_counts': {'":': 0, '<': 189, '<?xml version=': 0, '>': 189, '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': '7562961', 'n_tokens_mistral': 2326, 'n_tokens_neox': 1798, 'n_words': 345}