From 7337cc6b141933f7b85f6e4928c6a88b73c3cbba Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Mon, 25 Oct 2021 12:12:11 +0300 Subject: change_resource_owner.html: Replace "the_html" with searchResultHtml --- .../templates/admin/change_resource_owner.html | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/wqflask/wqflask/templates/admin/change_resource_owner.html b/wqflask/wqflask/templates/admin/change_resource_owner.html index 951df207..74ee1e45 100644 --- a/wqflask/wqflask/templates/admin/change_resource_owner.html +++ b/wqflask/wqflask/templates/admin/change_resource_owner.html @@ -68,40 +68,40 @@ populate_users = function(json_user_list){ let user_list = JSON.parse(json_user_list) - let the_html = "" + let searchResultsHtml = "" if (user_list.length > 0){ - the_html += ""; - the_html += ""; - the_html += ""; + searchResultsHtml += "
IndexNameE-mail AddressOrganization
"; + searchResultsHtml += ""; + searchResultsHtml += ""; for (_i = 0, _len = user_list.length; _i < _len; _i++) { this_user = user_list[_i] - the_html += ""; - the_html += ""; - the_html += "" + searchResultsHtml += ""; + searchResultsHtml += ""; + searchResultsHtml += "" if ("full_name" in this_user) { - the_html += ""; + searchResultsHtml += ""; } else { - the_html += "" + searchResultsHtml += "" } if ("email_address" in this_user) { - the_html += ""; + searchResultsHtml += ""; } else { - the_html += "" + searchResultsHtml += "" } if ("organization" in this_user) { - the_html += ""; + searchResultsHtml += ""; } else { - the_html += "" + searchResultsHtml += "" } - the_html += "" + searchResultsHtml += "" } - the_html += ""; - the_html += "
IndexNameE-mail AddressOrganization
" + (_i + 1).toString() + "
" + (_i + 1).toString() + "" + this_user.full_name + "" + this_user.full_name + "N/AN/A" + this_user.email_address + "" + this_user.email_address + "N/AN/A" + this_user.organization + "" + this_user.organization + "N/AN/A
"; + searchResultsHtml += ""; + searchResultsHtml += ""; } else { - the_html = "No users were found matching the entered criteria." + searchResultsHtml = "No users were found matching the entered criteria." } - $('#user_results').html(the_html) + $('#user_results').html(searchResultsHtml) if (user_list.length > 0){ $('#users_table').dataTable({ 'order': [[1, "asc" ]], -- cgit v1.2.3