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