Add option for custom fields to the export modal

This commit is contained in:
JonnyWong16 2020-09-28 23:47:32 -07:00
commit 26fb9a6803
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
6 changed files with 167 additions and 15 deletions

View file

@ -322,7 +322,7 @@ DOCUMENTATION :: END
% if _session['user_group'] == 'admin':
<div class="btn-group">
<button class="btn btn-dark export-button" id="toggle-export-modal" data-toggle="modal" data-target="#export-modal"
data-section_id="${data['section_id']}">
data-section_id="${data['section_id']}" data-media_type="${'photoalbum' if data['section_type'] == 'photo' else data['section_type']}">
<i class="fa fa-file-export"></i> Export Metadata
</button>
</div>
@ -565,7 +565,10 @@ DOCUMENTATION :: END
$("#toggle-export-modal").click(function() {
$.ajax({
url: 'export_metadata_modal',
data: { section_id: $(this).data('section_id') },
data: {
section_id: $(this).data('section_id'),
media_type: $(this).data('media_type')
},
cache: false,
async: true,
complete: function(xhr, status) {