62 lines
2.7 KiB
Handlebars
62 lines
2.7 KiB
Handlebars
<div class="panel">
|
|
<h2>Publish</h2>
|
|
<div class="row">
|
|
<div class="col-left">
|
|
<div id="file-selection-area">
|
|
|
|
<div id="drop-zone" ondrop="drop_handler(event);" ondragover="dragover_handler(event);" ondragend="dragend_handler(event)">
|
|
<div class="row">
|
|
<p>Drag and drop your file here, or choose your file below.</p>
|
|
<div class="info-message info-message--failure" id="input-error-file-selection" hidden="true"></div>
|
|
</div>
|
|
<div class="row">
|
|
<input type="file" id="siofu_input" name="file" accept="video/*,image/*" onchange="previewAndStageFile(event.target.files[0])" enctype="multipart/form-data"/>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="asset-preview-holder"></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="col-right">
|
|
<div id="publish-active-area">
|
|
|
|
{{> publishForm-Channel}}
|
|
|
|
{{> publishForm-Url}}
|
|
|
|
{{> publishForm-Details}}
|
|
|
|
<div class="row">
|
|
<div class="input-error" id="input-error-publish-submit" hidden="true"></div>
|
|
<button id="publish-submit" onclick="publishSelectedImage(event)">Publish</button>
|
|
<button onclick="resetPublishArea()">Reset</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript" >
|
|
function resetPublishArea (){
|
|
// reset file selection area
|
|
document.getElementById('file-selection-area').innerHTML = `<div id="drop-zone" ondrop="drop_handler(event);" ondragover="dragover_handler(event);" ondragend="dragend_handler(event)">
|
|
<p>Drag and drop your file here, or choose your file below.</p>
|
|
<div class="info-message info-message--failure" id="input-error-file-selection" hidden="true"></div>
|
|
<input type="file" id="siofu_input" name="file" accept="video/*,image/*" onchange="previewAndStageFile(event.target.files[0])" enctype="multipart/form-data"/>
|
|
</div>
|
|
<div id="asset-preview-holder"></div>`;
|
|
// reset inputs
|
|
document.getElementById('claim-name-input').value = '';
|
|
document.getElementById('publish-title').value = '';
|
|
document.getElementById('publish-description').value = '';
|
|
document.getElementById('publish-nsfw').checked = false;
|
|
// remove staged files
|
|
stagedFiles = null;
|
|
// clear any errors
|
|
document.getElementById('input-error-file-selection').innerHTML = '';
|
|
document.getElementById('input-error-claim-name').innerHTML = '';
|
|
document.getElementById('input-error-publish-submit').innerHTML = '';
|
|
document.getElementById('input-success-claim-name').hidden = true;
|
|
}
|
|
</script>
|