Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
41 lines (31 sloc) 1.54 KB
<script src="https://assets.crowd.aws/crowd-html-elements.js"></script>
<link rel="stylesheet" href="https://s3.amazonaws.com/smgtannotation/web/static/css/1.3fc3007b.chunk.css">
<link rel="stylesheet" href="https://s3.amazonaws.com/smgtannotation/web/static/css/main.9504782e.chunk.css">
<div id='document-text' style="display: none;">
{{ task.input.text }}
</div>
<div id='document-image' style="display: none;">
{{ task.input.taskObject | grant_read_access }}
</div>
<div id="metadata" style="display: none;">
{{ task.input.metadata }}
</div>
<crowd-form>
<input name="annotations" id="annotations" type="hidden">
<!-- Prevent crowd-form from creating its own button -->
<crowd-button form-action="submit" style="display: none;"></crowd-button>
</crowd-form>
<!-- Custom annotation user interface is rendered here -->
<div id="root"></div>
<crowd-button id="submitButton">Submit</crowd-button>
<script>
document.querySelector('crowd-form').onsubmit = function() {
document.getElementById('annotations').value = JSON.stringify(JSON.parse(document.querySelector('pre').innerText));
};
document.getElementById('submitButton').onclick = function() {
document.querySelector('crowd-form').submit();
};
</script>
<script src="https://s3.amazonaws.com/smgtannotation/web/static/js/1.3e5a6849.chunk.js"></script>
<script src="https://s3.amazonaws.com/smgtannotation/web/static/js/main.96e12312.chunk.js"></script>
<script src="https://s3.amazonaws.com/smgtannotation/web/static/js/runtime~main.229c360f.js"></script>
You can’t perform that action at this time.