Widget: DataExporter: Difference between revisions
From LINKS Community Center
Eschmidt (talk | contribs) No edit summary |
Eschmidt (talk | contribs) No edit summary |
||
Line 5: | Line 5: | ||
<head> | <head> | ||
<style> | <style> | ||
# | #form_wrapper { | ||
display: flex; | display: flex; | ||
flex-flow: row wrap; | flex-flow: row wrap; | ||
Line 29: | Line 29: | ||
return; | return; | ||
} | } | ||
const formData = new FormData(document.getElementById('export_form')); | |||
const lib = formData.get('library'); | |||
console.log(lib) | |||
const schema = await fetch(dat2).then(rsp => rsp.text()); | const schema = await fetch(dat2).then(rsp => rsp.text()); | ||
Line 46: | Line 50: | ||
<body> | <body> | ||
<button type="button" onclick="exportData()">Export Data</button> | <button type="button" onclick="exportData()">Export Data</button> | ||
<form> | <form id="export_form"> | ||
<div id=" | <div id="form_wrapper"> | ||
<fieldset> | <fieldset> | ||
<legend>Library</legend> | <legend>Library</legend> | ||
<input type="radio" id=" | <input type="radio" id="lib_TL" name="library" value="TL" checked> | ||
<label for=" | <label for="lib_TL">Technologies</label><br> | ||
<input type="radio" id=" | <input type="radio" id="lib_UCL" name="library" value="UCL"> | ||
<label for=" | <label for="lib_UCL">Use Cases</label><br> | ||
<input type="radio" id=" | <input type="radio" id="lib_GL" name="library" value="GL"> | ||
<label for=" | <label for="lib_GL">Guidelines</label> | ||
</fieldset> | </fieldset> | ||
<fieldset> | <fieldset> | ||
<legend>Format</legend> | <legend>Format</legend> | ||
<input type="radio" id=" | <input type="radio" id="FILE_XLSX" name="fileformat" value="xlsx" checked> | ||
<label for=" | <label for="FILE_XLSX">Excel (.xslx)</label><br> | ||
<input type="radio" id=" | <input type="radio" id="file_ODS" name="fileformat" value="ods"> | ||
<label for=" | <label for="file_ODS">OpenOffice (.ods)</label><br> | ||
<input type="radio" id=" | <input type="radio" id="file_CSV" name="fileformat" value="csv"> | ||
<label for=" | <label for="file_CSV">CSV (.csv)</label> | ||
</fieldset> | </fieldset> | ||
</div> | </div> |