csv-metadata-quality-web/templates/index.html
Alan Orth 198acdb1a7
Major refactor
Re-work upload and file processing so they are in the same Python
function. Now I will start exposing other command line options in
the form, like unsafe fixes, excluding fields, etc. Now I see tha
t it is easier to save the POSTed file and process it in the same
function so I don't have to pass around the other POSTed form val
ues as URL query parameters.

Now, as a result of changing the flow above, I also had to make a
change to the way I show the results page. Instead of processing
the file and returning the rendered results to the user directly,
I process the file, save the rendered results to /tmp, and return
a redirect to the user to the results page.
2021-03-13 22:11:26 +02:00

31 lines
1.5 KiB
HTML

<!doctype html>
<html lang="en" class="h-100">
{% include 'head.html' %}
<body class="d-flex flex-column h-100">
{% include 'header.html' %}
<main class="flex-shrink-0">
<div class="container py-3">
<p class="lead">The DSpace CSV Metadata Quality Checker is a collection of sanity checks and automated fixes for a number of common issues in metadata files.</p>
<form method="POST" action="" enctype="multipart/form-data">
<div class="mb-3">
<label for="formFile" class="form-label">Select a CSV file to process</label>
<input class="form-control" type="file" id="formFile" name="file" accept=".csv">
</div>
<p>Options</p>
<div class="mb-3 form-check form-switch">
<input class="form-check-input" type="checkbox" id="unsafeCheckbox" name="unsafe">
<label class="form-check-label" for="unsafeCheckbox" aria-describedby="unsafeHelp">Enable unsafe fixes</label>
<div id="unsafeHelp" class="form-text">This will remove newlines and perform <a href="https://withblue.ink/2019/03/11/why-you-need-to-normalize-unicode-strings.html" title='When "Zoë" !== "Zoë". Or why you need to normalize Unicode strings'>normalization of Unicode characters</a>. Read more about these <a href="https://github.com/ilri/csv-metadata-quality#unsafe-fixes">unsafe fixes</a>.</div>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
</main>
{% include 'footer.html' %}
</body>
</html>