{% extends "base.html" %}

{% block title %}
	&raquo; DC Contracts &raquo; {{batch_file.batch.contract.name}} &raquo;
 	Batches &raquo; {{batch_file.batch.reference}} &raquo;
 	{{batch_file.filename}} &raquo; Edit
{% endblock %}

{% block nav %}
	<a href="/e/dc_contracts">DC Contracts</a> &raquo; 
	<a href="/e/dc_contracts/{{batch_file.batch.contract.id}}"
		>{{batch_file.batch.contract.name}}</a> &raquo; 
	<a href="/e/dc_batches?dc_contract_id={{batch_file.batch.contract.id}}">Batches</a>
 	&raquo; 
	<a href="/e/dc_batches/{{batch_file.batch.id}}">{{batch_file.batch.reference}}</a>
 	&raquo; 
	<a href="/e/dc_batch_files/{{batch_file.id}}">{{batch_file.filename}}</a>
 	&raquo; Edit
{% endblock %}

{% block content %}

	<ul>
		<li>Filename: {{batch_file.filename}}</li>
		<li>
			Upload Timestamp:
			{{batch_file.upload_timestamp|date_format}}
		</li>
	</ul>

	<form action="/e/dc_batch_files/{{batch_file.id}}/edit" method="post">
		<fieldset>
			<legend>Update This Batch File</legend>	
			<label>Parser</label>
			<select name="parser_name">
				{% for parser_name in parser_names  %}
					{{input_option('bill_parser_name', parser_name, parser_name)}}
				{% endfor %}
			</select>
			<input type="submit" name="update" value="Update">
		</fieldset>
	</form>

	<form hx-delete="/e/dc_batch_files/{{batch_file.id}}/edit"
			hx-confirm="Are you sure you want to delete this file?">	
		<fieldset>
			<legend>Delete This Batch File</legend>	
			<input type="submit" value="Delete">
		</fieldset>
	</form>

{% endblock %}
