working injection?
This commit is contained in:
parent
2a49ca6bf2
commit
a81a096cfb
@ -69,7 +69,7 @@
|
||||
<h2>Load Details Via Text</h2>
|
||||
<div class="form-group">
|
||||
<label for="accountDetails">Paste Account Details</label>
|
||||
<textarea class="form-control" id="accountDetails" rows="4"></textarea>
|
||||
<textarea class="form-control" id="accountDetails" rows="4" data-shared-text="{{ shared_text }}"></textarea>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@ -131,11 +131,10 @@
|
||||
}
|
||||
});
|
||||
|
||||
const sharedText = '{{ shared_text|safe }}';
|
||||
|
||||
if (sharedText) {
|
||||
const accountDetailsTextarea = document.getElementById('accountDetails');
|
||||
if (accountDetailsTextarea) {
|
||||
const sharedText = accountDetailsTextarea.dataset.sharedText;
|
||||
|
||||
if (sharedText && sharedText !== 'None') {
|
||||
accountDetailsTextarea.value = sharedText;
|
||||
const event = new Event('input', {
|
||||
bubbles: true,
|
||||
@ -143,7 +142,6 @@
|
||||
});
|
||||
accountDetailsTextarea.dispatchEvent(event);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user