Add file format to export modal

This commit is contained in:
JonnyWong16 2020-08-03 21:14:56 -07:00
parent a7eb563c2e
commit a27a5b023b
No known key found for this signature in database
GPG key ID: B1F1F9807184697A

View file

@ -42,6 +42,18 @@ DOCUMENTATION :: END
</div> </div>
<p class="help-block">Select the export level.</p> <p class="help-block">Select the export level.</p>
</div> </div>
<div class="form-group">
<label for="file_format">File Format</label>
<div class="row">
<div class="col-md-12">
<select class="form-control" id="file_format" name="file_format">
<option value="csv">CSV</option>
<option value="json">JSON</option>
</select>
</div>
</div>
<p class="help-block">Select the export file format.</p>
</div>
</form> </form>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
@ -55,12 +67,14 @@ DOCUMENTATION :: END
$("#export_metadata").click(function() { $("#export_metadata").click(function() {
var section_id = $('#section_id').val(); var section_id = $('#section_id').val();
var rating_key = $('#rating_key').val(); var rating_key = $('#rating_key').val();
var file_format = $('#file_format').val();
$.ajax({ $.ajax({
url: 'export_metadata', url: 'export_metadata',
data: { data: {
section_id: section_id, section_id: section_id,
rating_key: rating_key rating_key: rating_key,
file_format: file_format
}, },
async: true, async: true,
success: function (data) { success: function (data) {