diff --git a/app/phrases/phrase_edit.php b/app/phrases/phrase_edit.php
index e878f04247..e5167be1f3 100644
--- a/app/phrases/phrase_edit.php
+++ b/app/phrases/phrase_edit.php
@@ -507,6 +507,8 @@ if (count($_POST) > 0) {
//draggable rows are initially empty
echo "
\n";
echo "";
+ //show loading
+ echo "| | Loading... | |
\n";
//cloning row and buttons created outside of 'structure' table body
echo "";
echo "\n";
diff --git a/app/phrases/resources/javascript/phrase_edit.js b/app/phrases/resources/javascript/phrase_edit.js
index e226919a39..025cd6f718 100644
--- a/app/phrases/resources/javascript/phrase_edit.js
+++ b/app/phrases/resources/javascript/phrase_edit.js
@@ -41,6 +41,14 @@ document.addEventListener("DOMContentLoaded", async function () {
add_draggable_rows();
});
+function remove_loading() {
+ //remove loading
+ const loading = document.getElementById('loading');
+ if (loading) {
+ loading.remove();
+ }
+}
+
async function fetch_data(command) {
try {
const response = await fetch('phrase_responder.php', {
@@ -104,6 +112,8 @@ async function add_existing() {
select_action.dispatchEvent(changeEvent);
}
}
+
+ remove_loading();
}
//