
					<div class="row">				
						<!-- Single col -->
						<section class="col-lg-8 connectedSortable">
							<div>
							
							<h1>{{ data.breadcrumb[-1] }}</h1>
													
							<p>{{ data.texts["run"]["intro"] | safe }}</p>
							</div>
								
						</section>        
					</div>
				 
					<div class="row">
						<section class="col-lg-8 connectedSortable">

							<!-- Horizontal Form -->
							<div class="box box-info">
								<div class="box-header pull-left">
									<a href="/run/download-template">{{ _("Haven't done it yet?") }} <i class="fa fa-download fa-download"></i> {{ _("Download CO<sub>2</sub>MPAS input template!") }}</a>
								</div>

								<div id="advanced-block" style="display: {% if data.inputs|length %}block{%else%}none{%endif%};">
									<div id="advanced_link" class="box-header pull-right">
										<a href="#" onclick="toggle_options(); return false;"><i class="fa fa-cogs"></i> {{ _("Advanced options") }}</a>
									</div>

									<div id="advanced_options" class="row" style="display: none;">
										<section class="col-lg-12">
											<div class="box-body">
												<div class="form-group" style="align: right;">
												
													<div class="checkbox">
														<label>
															<input type="checkbox" id="chk_declaration_mode">
															{{ _("Use only declaration mode") }} <i data-toggle="tooltip" data-placement="right" title="{{ data.texts['run']['options']['only declaration mode'] | safe }}" class="fa fa-question-circle co2-help"></i></h2>
														</label>
													</div>
													
													<div class="checkbox">
														<label>
															<input type="checkbox" id="chk_hard_validation">
															{{ _("Hard validation") }} <i data-toggle="tooltip" data-placement="right" title="{{ data.texts['run']['options']['hard validation'] | safe }}" class="fa fa-question-circle co2-help"></i></h2>
														</label>
													</div>

													<div class="checkbox">
														<label>
															<input type="checkbox" id="chk_enable_selector">
															{{ _("Enable selector") }} <i data-toggle="tooltip" data-placement="right" title="{{ data.texts['run']['options']['enable selector'] | safe }}" class="fa fa-question-circle co2-help"></i></h2>
														</label>
													</div>

													<div class="checkbox">
														<label>
															<input type="checkbox" id="chk_only_summary">
															{{ _("Only summary") }} <i data-toggle="tooltip" data-placement="right" title="{{ data.texts['run']['options']['only summary'] | safe }}" class="fa fa-question-circle co2-help"></i></h2>
														</label>

													</div>
													{% if data.conf|length %}
													<div class="checkbox">
														<label>
															<input type="checkbox" id="chk_custom_conf">
															{{ _("Use custom configuration file") }} <i data-toggle="tooltip" data-placement="right" title="{{ data.texts['run']['options']['custom conf file'] | safe }}" class="fa fa-question-circle co2-help"></i></h2>
														</label>

													</div>
													{% endif %}
											</div>
											</div>
										</section>
									</div>

								</div>
								<br>

								<!-- /.box-header -->
								<!-- form start -->
								<div id="uploads-list" class="box-body">
									<div class="box-body">               	
										{% if not data.inputs|length %}
										<div>
											<p>No input files have been uploaded</p>											
										</div>
										{% else %}

											<div class="box-header with-border">
												<h3 class="box-title">{{ _("Your files ready to be processed") }}:</h3>
												<p style="font-size: 11px;"><a href="" onclick="$('.exclude').toggle(); return false;"><i class="fa fa-remove"></i> Click here to exclude some files.</a></p>
											</div>
											<!-- /.box-header -->
											<div class="box-body">
												<table class="table table-bordered">
													<tbody><tr>
														<th style="width: 10px">#</th>
														<th class="exclude" style="width: 10px; display: none;">{{ _('Exclude') }}</th>
														<th>{{ _("Filename") }}</th>														
														<th style="width: 40px">
															{% if data.inputs|length > 1 %}
																<form action="/run/delete-all" method="get">
																	<button id="delete-button" class="btn btn-sm btn-warning"><i class="glyphicon glyphicon-trash"></i> {{ _("Delete all") }}</button>
																</form>
															{% else %}
																&nbsp;
															{% endif %}
														</th>
													</tr>
													{% for file in data.inputs %}
													<tr>
														<td>{{loop.index}}.</td>
														<td class="exclude" style="display: none;"><input type="checkbox" id="exclude_file_{{loop.index}}" onclick="exclude_files({{loop.index}}, $('#exclude_file_{{loop.index}}').is(':checked'));"></td>
														<td title="{{file}}">{{(file[:75] + '...') if file|length > 75 else file}}</td>
														<td>
															<form action="/run/delete-file" method="get">
																<input type="hidden" name="fn" value="{{loop.index}}">
																<button id="delete-button" class="btn btn-sm btn-danger"><i class="glyphicon glyphicon-trash"></i> {{ _("Delete") }}</button>
															</form>
														</td>
													</tr>										
													{% endfor %}
												</tbody></table>
											</div>
											<!-- /.box-body -->

										{% endif %}
									</div>									
								</div>

								<!-- /.box-body -->
								<div class="box-footer"> 

									<div class="form-group col-md-5 pull-right">
										<form id="add-file-form" action="/run/add-file" enctype="multipart/form-data" method="post">
											<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
											<div class="row fileupload-buttonbar">
												<div class="col-lg-12">
													<div>
														<div class="input-group">
																<input type="text" name="files[]" id="file_path_xhr" class="form-control" placeholder="Browse...">
																<span class="input-group-btn">
																		<button class="btn btn-default" type="button" id="file_browser_xhr">
																		<i class="fa fa-plus"></i> {{ _("Choose one or more input files") }}</button>
																</span>

														</div>
														<input type="file" class="hidden" id="file_xhr" name="files[]" multiple>
													</div>

													<span class="fileupload-process"></span>
												</div>
											</div>
											<!-- The table listing the files available for upload/download -->
											<table role="presentation" class="table table-striped">
												<tbody class="files"></tbody>
											</table>
										</form>
									</div>

								</div>	
<script>
$(function () {
    $('#add-file-form').fileupload({
        dataType: 'json',
        singleFileUploads: false,
        done: function (e, data) {
					$('#uploads-list').load('/run/uploads-list');
        }
    })
});
</script>
								<div id="simulation-button" class="box-footer" style="display: {% if data.inputs|length %}block{%else%}none{%endif%};">
									<form action="/run/simulation">
										<input type="hidden" name="declaration_mode" id="declaration_mode" value="">
										<input type="hidden" name="hard_validation" id="hard_validation" value="">
										<input type="hidden" name="enable_selector" id="enable_selector" value="">
										<input type="hidden" name="only_summary" id="only_summary" value="">
										<input type="hidden" name="custom_conf" id="custom_conf" value="">
										<input type="hidden" name="exclude_list" id="exclude_list" value="">
										<div class="row">										
											<div class="col-xs-12 col-md-6">
												<label class="pull-right">
													{% if not data.ta_enabled %}
													{{ _("Type approval mode (disabled)") }} <i data-toggle="tooltip" data-placement="top" class="fa fa-question-circle co2-help" title="{{ data.texts['run']['hints']['why ta disabled'] | safe }}"></i></h2>
													{% else %}
													{{ _("Type approval mode") }}
													{% endif %}
													<input onchange="check_ta_mode();" {% if not data.ta_enabled %}{{ "disabled=true " | safe }}{% endif %}id="tamode" name="tamode" type="checkbox" data-toggle="toggle">
												</label>
											</div>
											<div class="col-xs-12 col-md-6">
												<button type="submit" class="col-xs-12 col-md-12 btn btn-lg btn-success"><i class="fa fa-car"></i> <span id="run-simulation">{{ _("Run simulation") }}</span> <span id="ta-label" class="badge badge-warning" style="display: none;"> - <i class="fa fa-warning"></i> TYPE APPROVAL MODE</span></button>
											</div>
											<p class="col-xs-12 col-md-12 pull-right" style="text-align: right;">{{ _("Simulation will run in") }} <span id="simulation-mode" class="text-green">{{ _("Engineering mode") }}</span></i></p>
										</div>
									</form>
								</div>
								
							</div>
							<!-- /.box -->

						</section>						
					</div>
					